EspressReport 6.6

quadbase.reportdesigner.ReportElements
Class ReportRTFObject

java.lang.Object
  extended by quadbase.reportdesigner.ReportElements.ReportElement
      extended by quadbase.reportdesigner.ReportElements.ReportCell
          extended by quadbase.reportdesigner.ReportElements.ReportRTFObject
All Implemented Interfaces:
java.io.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:
Serialized Form

Field Summary
static java.lang.String XMLTAG
           
 
Fields inherited from class quadbase.reportdesigner.ReportElements.ReportElement
bgColor, borderColor, CHART, COLUMN, COLUMNHEADER, FORMULA, GRID, height, ID_TYPE, IMAGE, isLocked, LABEL, LINE, min_height, min_width, NONE, rotate_angle, ROTATE_CLOCKWISE, ROTATE_COUNTERCLOCKWISE, ROTATE_NONE, roundCornerRadius, roundCornersArray, RTFOBJECT, SECTION, securityMap, snap, SORT_X, SORT_Y, SORT_Z, SUBREPORT, TABLE, TABLEOFCONTENTS, TITLE, visible, vsnap, width, x
 
Constructor Summary
ReportRTFObject()
           
ReportRTFObject(byte[] d)
           
 
Method Summary
 void addFormat(java.lang.String formatName, IFormat format, int type)
          Add a format to the available list of formats that can be used by formulas.
 void applyTemplate(ReportRTFObject _cell)
          Does nothing
 void copy(ReportRTFObject _source)
           
 void copyTemplate(ReportRTFObject _cell)
          For internal use only.
static ReportRTFObject createReportRTFObject(java.io.DataInput in, int version)
          For internal use only.
static ReportRTFObject createReportRTFObject(org.w3c.dom.Node node, int version)
          For internal use only.
 void deepCopy(ReportRTFObject _source)
           
 int getActualColumnCount()
          For internal use only.
 short getAlign()
          Get the horizontal alignment of this element.
 int getColumnCount()
           
 double getColumnSpacing()
           
 double getColumnWidth()
           
 byte[] getData()
          Get the content as a byte array.
 java.lang.Object[] getFormatMap()
           
 java.util.Vector<java.lang.Object[]> getFormats()
           
 java.lang.String getFullText(quadbase.reportdesigner.report.Report report, ReportTable tbl)
           
 java.lang.String getSavedFileLocation()
           
 java.lang.String getSavedFileURL()
           
 boolean isBorderClosed()
           
 void read(java.io.DataInput in, int version)
          For internal use only.
 void readXML(org.w3c.dom.Node node, int version)
          For internal use only
 void removeFormat(java.lang.String formatName)
          Remove the format with the specific name.
 void setBorderClosed(boolean state)
           
 void setColumnCount(int columnC)
          Set the number of columns to display the content.
 void setColumnSpacing(double space)
          Set the spacing between columns if there are more than one columns.
 void setData(byte[] d)
          Same as setData(d, (Vector)null).
 void setData(byte[] d, java.lang.Object[] fmap)
           
 void setData(byte[] d, java.util.Vector<java.lang.Object> f)
          Set the content of this rich text field.
 void setFormats(java.util.Vector<java.lang.Object[]> f)
           
 void setHTMLParameters(java.lang.String dirLocation, java.lang.String url, java.lang.String prefix)
          API only feature to set export location and reference URL for images.
 void write(java.io.DataOutput out)
          For internal use only.
 void writeXML(java.io.Writer out, boolean writeElementTag)
          For internal use only
 
Methods inherited from class quadbase.reportdesigner.ReportElements.ReportCell
applyStyle, applyStyleButNotWH, applyTemplate, applyTemplate, clone, copy, copyTemplate, createCell, createCell, createFormulaObject, createFormulaObjectFromName, createFormulaObjectFromText, deepCopy, equals, formulaReferenced, getColIndex, getColumn, getDataFormat, getEntry, getFormula, getFormulaName, getFormulaObj, getScriptedValue, getSQLType, setColumn, setDataFormat, setEntry, setFormula, setFormulaObj, setScriptedValue
 
Methods inherited from class quadbase.reportdesigner.ReportElements.ReportElement
addSecurityLevel, applyImageTemplate, applyImageTemplateExceptBound, applySecurity, applyStyle, applyStyleButNotWH, applyTemplate, applyTemplate, applyTemplate, contains, contains, containsX, containsY, copy, copyTemplate, createScriptObject, createScriptObjectFromName, deepCopy, doesElementSupportRoundCorners, equals, findElementsAbove, findElementsBelow, findElementsToLeft, findElementsToRight, findElementsToRight, findElementType, findGroupElementType, findMaxXr, findMaxYd, findMinX, findMinY, findSpecificElements, getAllColors, getBgColor, getBookmark, getBorder, getBorderColor, getBorderThickness, getBottomBorder, getCustomID, getDrawX, getDrawX, getDrawY, getDrawY, getDrillDownName, getElementType, getElementTypeName, getFirst2RowOfColumns, getFirst2RowOfColumns, getFont, getFontColor, getHeight, getHeight, getHeightOfElement, getHeightOfElement, getHeightToPoints, getHint, getID, getLeftBorder, getLink, getMaxXr, getMin_Height, getMin_Width, getMinX, getRefFont, getRefFontToDraw, getRightBorder, getRotateAngle, getRoundCornerRadius, getRoundCornersArray, getScript, getScriptName, getScriptObj, getSecuredScripts, getSecurityLevel, getSecurityLevels, getSecurityMap, getSnap, getStyleName, getTarget, getText, getTopBorder, getVAlign, getVSnap, getWidth, getWidth, getWidthOfElement, getWidthOfElement, getWidthToPoints, getX, getX, getXPos, getXPos, getXToPoints, getY, getY, getYPos, getYPos, getYToPoints, getZ, hasBorder, inBottomHalf, inLeftEnd, inLeftHalf, inRightEnd, inRightHalf, inTopHalf, isCrossTabElt, isDrawAgain, isLocked, isNoWrap, isResizeToFitContent, isSecurityLevelDefined, isSecurityTextScript, isShiftSecuredColX, isShiftSecuredColXIncludeHeaderAndFooter, isSnapToGrid, isUnderline, isVisible, moveForCrossTabFixedField, moveForCrossTabFixedField, newArrayX, newArrayY, removeScriptReferenced, removeSecurityLevel, renameSecurityLevel, resize, resizeForCrossTabFixedField, resizeForCrossTabFixedField, scriptReferenced, securityScriptReferenced, setAlign, setBgColor, setBookmark, setBorder, setBorderColor, setBorderThickness, setBorderThickness, setBorderThickness, setBottomBorder, setCustomID, setDrawAgain, setDrawX, setDrawX, setDrawY, setDrawY, setDrillDownName, setFont, setFontColor, setHeight, setHeight, setHint, setID, setID, setInchGridSpace, setLeftBorder, setLink, setLocked, setMinHeight, setMinWidth, setNoWrap, setResizeToFitContent, setRightBorder, setRotateAngle, setRotateAngle, setRoundCornerRadius, setRoundCornersArray, setScript, setScriptName, setScriptObj, setScriptObjNull, setSecurityLevelProperties, setSecurityMap, setSecurityTextScript, setShiftSecuredColX, setShiftSecuredColXIncludeHeaderAndFooter, setSnap, setSnapToGrid, setSnapToGrid, setStyleName, setTarget, setText, setTopBorder, setUnderline, setVAlign, setVisible, setVSnap, setWidth, setWidth, setX, setX, setXX, setXX, setY, setY, setYY, setYY, setZ, shift, shiftObjectsOnMove, shiftOnMove, sortElement, sortElement, sortElementHorizontally, sortElementInXYOrder, sortElementVertically, swapElements, switchSecurityProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XMLTAG

public static final java.lang.String XMLTAG
See Also:
Constant Field Values
Constructor Detail

ReportRTFObject

public ReportRTFObject(byte[] d)

ReportRTFObject

public ReportRTFObject()
Method Detail

setData

public void setData(byte[] d,
                    java.lang.Object[] fmap)

getFullText

public java.lang.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(java.io.DataOutput out)
           throws java.io.IOException
For internal use only.

Overrides:
write in class ReportCell
Throws:
java.io.IOException

writeXML

public void writeXML(java.io.Writer out,
                     boolean writeElementTag)
              throws java.io.IOException
Description copied from class: ReportCell
For internal use only

Overrides:
writeXML in class ReportCell
Throws:
java.io.IOException

createReportRTFObject

public static ReportRTFObject createReportRTFObject(org.w3c.dom.Node node,
                                                    int version)
                                             throws java.lang.Exception
For internal use only.

Throws:
java.lang.Exception

readXML

public void readXML(org.w3c.dom.Node node,
                    int version)
             throws java.lang.Exception
Description copied from class: ReportCell
For internal use only

Overrides:
readXML in class ReportCell
Throws:
java.lang.Exception

createReportRTFObject

public static ReportRTFObject createReportRTFObject(java.io.DataInput in,
                                                    int version)
                                             throws java.lang.Exception
For internal use only.

Throws:
java.lang.Exception

read

public void read(java.io.DataInput in,
                 int version)
          throws java.lang.Exception
For internal use only.

Overrides:
read in class ReportCell
Throws:
java.lang.Exception

getFormats

public java.util.Vector<java.lang.Object[]> getFormats()

setFormats

public void setFormats(java.util.Vector<java.lang.Object[]> f)

setData

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


setData

public void setData(byte[] d,
                    java.util.Vector<java.lang.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(java.lang.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(java.lang.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 java.lang.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:
java.lang.IllegalArgumentException

getColumnSpacing

public double getColumnSpacing()

setColumnCount

public void setColumnCount(int columnC)
                    throws java.lang.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:
java.lang.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 java.lang.Object[] getFormatMap()

setHTMLParameters

public void setHTMLParameters(java.lang.String dirLocation,
                              java.lang.String url,
                              java.lang.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 java.lang.String getSavedFileLocation()

getSavedFileURL

public java.lang.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:
IAlignConstants

EspressReport 6.6