Class ReportRTFObject

All Implemented Interfaces:
Serializable

public class ReportRTFObject extends ReportCell
This object is used to display a stream of data in RTF. This object has multi-page support.
See Also:
  • Field Details

  • Constructor Details

    • ReportRTFObject

      public ReportRTFObject(byte[] d)
    • ReportRTFObject

      public ReportRTFObject()
  • Method Details

    • setData

      public void setData(byte[] d, Object[] fmap)
    • getFullText

      public String getFullText(quadbase.reportdesigner.report.Report report, ReportTable tbl)
    • copy

      public void copy(ReportRTFObject _source)
    • deepCopy

      public void deepCopy(ReportRTFObject _source)
    • copyTemplate

      public void copyTemplate(ReportRTFObject _cell)
      For internal use only.
    • applyTemplate

      public void applyTemplate(ReportRTFObject _cell)
      Does nothing
      Parameters:
      _cell - the SubReportObject object being emulated
    • write

      public void write(DataOutput out) throws IOException
      For internal use only.
      Overrides:
      write in class ReportCell
      Throws:
      IOException
    • writeXML

      public void writeXML(Writer out, boolean writeElementTag) throws IOException
      Description copied from class: ReportCell
      For internal use only
      Overrides:
      writeXML in class ReportCell
      Throws:
      IOException
    • createReportRTFObject

      public static ReportRTFObject createReportRTFObject(Node node, int version) throws Exception
      For internal use only.
      Throws:
      Exception
    • readXML

      public void readXML(Node node, int version) throws Exception
      Description copied from class: ReportCell
      For internal use only
      Overrides:
      readXML in class ReportCell
      Throws:
      Exception
    • createReportRTFObject

      public static ReportRTFObject createReportRTFObject(DataInput in, int version) throws Exception
      For internal use only.
      Throws:
      Exception
    • read

      public void read(DataInput in, int version) throws Exception
      For internal use only.
      Overrides:
      read in class ReportCell
      Throws:
      Exception
    • getFormats

      public Vector<Object[]> getFormats()
    • setFormats

      public void setFormats(Vector<Object[]> f)
    • setData

      public void setData(byte[] d)
      Same as setData(d, (Vector)null).
    • setData

      public void setData(byte[] d, Vector<Object> f)
      Set the content of this rich text field. If the text contains formulas, a vector of format names can be supplied will the content bytes to indicate the format to be used with each formula. See 'addFormat' to find out how to associate a format name to the actual IFormat object.
      Parameters:
      d - The byte array from an RTF file or an RTF formated stream.
      f - A vector of format names to be used for each formula in the embedded text.
    • addFormat

      public void addFormat(String formatName, IFormat format, int type)
      Add a format to the available list of formats that can be used by formulas. If a format with the same name already exists, the new format will over write the old. See 'setData' to find out to specify a format for each embedded formula.
      Parameters:
      formatName - The name of the format. The user can associate this name to any formula.
      format - The actual format.
      type - The type of the formula. STRING, LOGICAL, NUMERIC or TIMESTAMP.
    • removeFormat

      public void removeFormat(String formatName)
      Remove the format with the specific name.
    • getData

      public byte[] getData()
      Get the content as a byte array.
    • isBorderClosed

      public boolean isBorderClosed()
    • setBorderClosed

      public void setBorderClosed(boolean state)
    • setColumnSpacing

      public void setColumnSpacing(double space) throws IllegalArgumentException
      Set the spacing between columns if there are more than one columns. The unit is inches. The default value is 0.25. The argument cannot be less than 0.
      Throws:
      IllegalArgumentException
    • getColumnSpacing

      public double getColumnSpacing()
    • setColumnCount

      public void setColumnCount(int columnC) throws IllegalArgumentException
      Set the number of columns to display the content. The value must be between 1 and 4 inclusive. The default number is 1.
      Throws:
      IllegalArgumentException
    • getColumnCount

      public int getColumnCount()
    • getActualColumnCount

      public int getActualColumnCount()
      For internal use only. Determine the actual column count. This is the actual number of columns that can fit within this object. Each column is expected to have a width of at least 1 inch. Therefore, if columnCount + ((columnCount - 1) * columnSpacing is greater the width of this object, the column count must be reduced. This test is repeated until the number of columns can fit within this object. The acutal column count will be between 1 and columnCount inclusive.
    • getColumnWidth

      public double getColumnWidth()
    • getFormatMap

      public Object[] getFormatMap()
    • setHTMLParameters

      public void setHTMLParameters(String dirLocation, String url, String prefix)
      API only feature to set export location and reference URL for images. This method is only relevant when the report is exported to an output stream in HTML or DHTML format. When the report is exported, images within this rich text field will be saved in the specified location and named with the specific prefix. These images are referenced by the specific URL in the exported HTML stream.
      Parameters:
      dirLocation - The directory for saving the images.
      url - The URL directory to reference the images.
      prefix - The prefix for the generated image file names.
    • getSavedFileLocation

      public String getSavedFileLocation()
    • getSavedFileURL

      public String getSavedFileURL()
    • getAlign

      public short getAlign()
      Description copied from class: ReportElement
      Get the horizontal alignment of this element. Returns alignment constants as listed in IAlignConstants.
      Overrides:
      getAlign in class ReportElement
      See Also: