EspressReport 6.6

quadbase.reportdesigner.ReportElements
Class ReportImage

java.lang.Object
  extended by quadbase.reportdesigner.ReportElements.ReportElement
      extended by quadbase.reportdesigner.ReportElements.ReportCell
          extended by quadbase.reportdesigner.ReportElements.ReportImage
All Implemented Interfaces:
java.io.Serializable, quadbase.common.util.internal.IReportImage
Direct Known Subclasses:
ReportChartObject, ReportGrid, ReportLine

public class ReportImage
extends ReportCell
implements quadbase.common.util.internal.IReportImage, java.io.Serializable

This class can be used to insert images anywhere in the Report--in the ReportSection, or ReportTable.

See Also:
Serialized Form

Field Summary
static int CENTER
          This constant is only used for the background image.
static java.lang.String DBImageDir
           
static int FIT
          This constant is only used for the background image.
static int TILE
          This constant is only used for the background image.
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
ReportImage()
          Constructs a ReportImage with no label
ReportImage(java.lang.String name)
          Constructs a ReportImage with the specified label
 
Method Summary
 void applyTemplate(ReportImage _cell)
          Specifies the look & feel to be the same as another ReportImage object.
 void applyTemplate(ReportImage _cell, boolean applyScript)
          Specifies the look & feel to be the same as another ReportImage object.
 void copy(ReportImage _cell)
          Specifies this ReportImage to be the same as "_cell"
 void copyTemplate(ReportImage _cell)
          For internal use only.
static ReportImage createImage(java.io.DataInput in, int version)
          For internal use only.
static ReportImage createImage(java.io.DataInput in, int version, boolean pack, quadbase.common.util.internal.FileInMemTable subFilesTable)
          For internal use only.
static ReportImage createImage(org.w3c.dom.Node node, int version)
          For internal use only.
 quadbase.common.util.internal.IReportImage createReportImage(java.lang.String name)
          internal use only Constructs a ReportImage with the specified label
 void deepCopy(ReportImage _cell)
          internal use only
 boolean equals(ReportImage _cell)
          internal use only Checks if this ReportImage object's properties are the same as "_cell"
 byte[] getBytes()
          Get the this image's data in bytes.
 int getFlashFrameCount()
           
 float getFlashFrameRate()
           
 int getImageOption()
          This method is only used for the background image.
 java.lang.String getImagePath()
          Gets the image PATH
 int getImageType()
          Gets the image format of this image (GIF, PNG, JPEG, etc...) See IExportConstants for possible returned values.
 java.net.URL getImageURL()
          Gets the URL associated with this image.
 int getJPEGQuality()
          Since JPEG uses compression, which decimates the quality of the image, this method gets the JPEG quality index, default is 99.
 int getPdfImageType()
          Gets the image format of this image (GIF, PNG, JPEG, etc...) when the report is exported as a PDF file.
 int getPNGCompression()
          Gets the PNG compression index, default is 0.
 java.lang.String getRelativePath()
          internal use only Gets the relative path to where the image can be found iff it is an DB image (one that resides in the DBImages directory of the ER installation)
 java.lang.String getSavedFileLocation()
          Gets the path to the image on disk
 java.lang.String getSavedFileURL()
          gets the URL location to the image.
 boolean isDBImage()
          internal use only Returns whether this image is stored in the database.
 boolean isGIFTransparent()
          Gets the state of GIF transparent mode.
 void read(java.io.DataInput in, int version)
          For internal use only.
 void read(java.io.DataInput in, int version, boolean pack, quadbase.common.util.internal.FileInMemTable subFilesTable)
          internal use only.
 void readXML(org.w3c.dom.Node node, int version)
          For internal use only.
 void setBytes(byte[] b)
          Set the bytes to be used as this image's data.
 void setBytes(java.lang.String filename)
           
 void setDBImage(boolean fdb)
          internal use only Sets this image as a Database image, it will be stored as an array of bytes on a database system.
 void setFlashFrameCount(int ct)
           
 void setFlashFrameRate(float rate)
           
 void setGIFTransparent(boolean b)
          Sets the state of GIF transparent mode.
 void setHTMLParameters(java.lang.String dirLocation, java.lang.String url, java.lang.String fileName)
          Sets some options for outputting in HTML
 void setImageOption(int i)
          This method is only used for the background image.
 void setImagePath(java.lang.String path)
          Sets the image PATH
 void setImagePath(java.lang.String path, boolean setBytes)
           
 void setImageType(int type)
          Sets the image format of this image (GIF, PNG, JPEG, etc...) See IExportConstants for possible parameter values.
 void setImageURL(java.net.URL url)
          Sets the image URL
 void setImageURL(java.net.URL url, boolean setBytes)
           
 void setJPEGQuality(int q)
          Since JPEG uses compression, which decimates the quality of the image, this method sets the JPEG quality index, default is 99.
 void setPdfImageType(int type)
          Sets the image format of this image (GIF, PNG, JPEG, etc...) when the report is exported as a PDF file.
 void setPNGCompression(int q)
          Sets the PNG compression index, default is 0.
 void setRelativePath(java.lang.String rpath)
          internal use only Sets the relative path to where the image can be found iff it is an DB image (one that resides in the DBImages directory of the ER installation)
 java.lang.String toString()
          internal use only
 void write(java.io.DataOutput out)
          For internal use only.
 void write(java.io.DataOutput out, boolean pack)
          internal use only
protected  void writeImageData(java.io.DataOutput out, boolean pack)
          Writes image data to a file specified in the imageURL field.
 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, getAlign, 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, wait, wait, wait
 

Field Detail

DBImageDir

public static final java.lang.String DBImageDir
See Also:
Constant Field Values

XMLTAG

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

CENTER

public static final int CENTER
This constant is only used for the background image. It specifies the background image to display once in the center of each page. This is the default.

See Also:
Constant Field Values

FIT

public static final int FIT
This constant is only used for the background image. It specifies the background image to be resized to fit the entire page.

See Also:
Constant Field Values

TILE

public static final int TILE
This constant is only used for the background image. It specifies the background image to tile to fill the entire page.

See Also:
Constant Field Values
Constructor Detail

ReportImage

public ReportImage()
Constructs a ReportImage with no label


ReportImage

public ReportImage(java.lang.String name)
Constructs a ReportImage with the specified label

Parameters:
name - name of the new ReportImage object
Method Detail

copy

public void copy(ReportImage _cell)
Specifies this ReportImage to be the same as "_cell"

Parameters:
_cell - the ReportImage object being emulated

deepCopy

public void deepCopy(ReportImage _cell)
internal use only


copyTemplate

public void copyTemplate(ReportImage _cell)
For internal use only.


applyTemplate

public void applyTemplate(ReportImage _cell)
Specifies the look & feel to be the same as another ReportImage object.

Parameters:
_cell - the ReportImage object being emulated

applyTemplate

public void applyTemplate(ReportImage _cell,
                          boolean applyScript)
Specifies the look & feel to be the same as another ReportImage object.

Parameters:
applyScript - If true, the script text of the object will also be applied.

equals

public boolean equals(ReportImage _cell)
internal use only Checks if this ReportImage object's properties are the same as "_cell"

Parameters:
_cell - the ReportImage object being compared to

getImageType

public int getImageType()
Gets the image format of this image (GIF, PNG, JPEG, etc...) See IExportConstants for possible returned values.


setImageType

public void setImageType(int type)
Sets the image format of this image (GIF, PNG, JPEG, etc...) See IExportConstants for possible parameter values.
Default is JPEG.


getPdfImageType

public int getPdfImageType()
Gets the image format of this image (GIF, PNG, JPEG, etc...) when the report is exported as a PDF file. See IExportConstants for possible returned values.


setPdfImageType

public void setPdfImageType(int type)
Sets the image format of this image (GIF, PNG, JPEG, etc...) when the report is exported as a PDF file. See IExportConstants for possible parameter values.
Default is PNG


getJPEGQuality

public int getJPEGQuality()
Since JPEG uses compression, which decimates the quality of the image, this method gets the JPEG quality index, default is 99. best quality (99) >= jpegQuality => (1) worse quality


setJPEGQuality

public void setJPEGQuality(int q)
Since JPEG uses compression, which decimates the quality of the image, this method sets the JPEG quality index, default is 99. best quality (99) >= jpegQuality => (1) worse quality


getPNGCompression

public int getPNGCompression()
Gets the PNG compression index, default is 0. See quadbase.ChartAPI.IExportConstants for possible values (eg. quadbase.ChartAPI.IExportConstants.PNG_COMPRESSION_FAST).


setPNGCompression

public void setPNGCompression(int q)
Sets the PNG compression index, default is 0. See quadbase.ChartAPI.IExportConstants for possible values (eg. quadbase.ChartAPI.IExportConstants.PNG_COMPRESSION_FAST).


isGIFTransparent

public boolean isGIFTransparent()
Gets the state of GIF transparent mode. If it is transparent, then the background will show throughout the image.


setGIFTransparent

public void setGIFTransparent(boolean b)
Sets the state of GIF transparent mode. If it is transparent, then the background will show throughout the image.


getFlashFrameCount

public int getFlashFrameCount()

setFlashFrameCount

public void setFlashFrameCount(int ct)

getFlashFrameRate

public float getFlashFrameRate()

setFlashFrameRate

public void setFlashFrameRate(float rate)

setImageOption

public void setImageOption(int i)
This method is only used for the background image. It sets the display option for the background image. Possible values are ReportImage.CENTER (default), ReportImage.FIT, and ReportImage.TILE.


getImageOption

public int getImageOption()
This method is only used for the background image. It returns the display option for the background image. Possible values are ReportImage.CENTER (default), ReportImage.FIT, and ReportImage.TILE.


getImageURL

public java.net.URL getImageURL()
Gets the URL associated with this image.

Returns:
URL the URL of the location of the image.

setImageURL

public void setImageURL(java.net.URL url)
Sets the image URL

Specified by:
setImageURL in interface quadbase.common.util.internal.IReportImage
Parameters:
url - the URL location of the image.

setImageURL

public void setImageURL(java.net.URL url,
                        boolean setBytes)
Specified by:
setImageURL in interface quadbase.common.util.internal.IReportImage

getImagePath

public java.lang.String getImagePath()
Gets the image PATH

Returns:
image PATH

setImagePath

public void setImagePath(java.lang.String path)
Sets the image PATH

Parameters:
path - image the path to this image

setImagePath

public void setImagePath(java.lang.String path,
                         boolean setBytes)

setBytes

public void setBytes(java.lang.String filename)

setHTMLParameters

public void setHTMLParameters(java.lang.String dirLocation,
                              java.lang.String url,
                              java.lang.String fileName)
Sets some options for outputting in HTML

Parameters:
dirLocation - path to the image on disk
url - URL location to the image
fileName - the name of the image file.

getSavedFileLocation

public java.lang.String getSavedFileLocation()
Gets the path to the image on disk


getSavedFileURL

public java.lang.String getSavedFileURL()
gets the URL location to the image.


setDBImage

public void setDBImage(boolean fdb)
internal use only Sets this image as a Database image, it will be stored as an array of bytes on a database system.

Specified by:
setDBImage in interface quadbase.common.util.internal.IReportImage

isDBImage

public boolean isDBImage()
internal use only Returns whether this image is stored in the database.


setRelativePath

public void setRelativePath(java.lang.String rpath)
internal use only Sets the relative path to where the image can be found iff it is an DB image (one that resides in the DBImages directory of the ER installation)

Specified by:
setRelativePath in interface quadbase.common.util.internal.IReportImage

getRelativePath

public java.lang.String getRelativePath()
internal use only Gets the relative path to where the image can be found iff it is an DB image (one that resides in the DBImages directory of the ER installation)

Specified by:
getRelativePath in interface quadbase.common.util.internal.IReportImage

setBytes

public void setBytes(byte[] b)
Set the bytes to be used as this image's data.

Parameters:
b - the image in bytes

getBytes

public byte[] getBytes()
Get the this image's data in bytes.


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

write

public void write(java.io.DataOutput out,
                  boolean pack)
           throws java.io.IOException
internal use only

Throws:
java.io.IOException

writeImageData

protected void writeImageData(java.io.DataOutput out,
                              boolean pack)
                       throws java.io.IOException
Writes image data to a file specified in the imageURL field.

Parameters:
pack - If true, the image is written in 2KB blocks
Throws:
java.io.IOException

writeXML

public void writeXML(java.io.Writer out,
                     boolean writeElementTag)
              throws java.io.IOException
For internal use only.

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

createImage

public static ReportImage createImage(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
For internal use only.

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

createImage

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

Throws:
java.lang.Exception

createImage

public static ReportImage createImage(java.io.DataInput in,
                                      int version,
                                      boolean pack,
                                      quadbase.common.util.internal.FileInMemTable subFilesTable)
                               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

read

public void read(java.io.DataInput in,
                 int version,
                 boolean pack,
                 quadbase.common.util.internal.FileInMemTable subFilesTable)
          throws java.lang.Exception
internal use only.

Throws:
java.lang.Exception

toString

public java.lang.String toString()
internal use only

Overrides:
toString in class java.lang.Object

createReportImage

public quadbase.common.util.internal.IReportImage createReportImage(java.lang.String name)
internal use only Constructs a ReportImage with the specified label

Specified by:
createReportImage in interface quadbase.common.util.internal.IReportImage
Parameters:
name - name of the new ReportImage object

EspressReport 6.6