Class ReportImage
java.lang.Object
quadbase.reportdesigner.ReportElements.ReportElement
quadbase.reportdesigner.ReportElements.ReportCell
quadbase.reportdesigner.ReportElements.ReportImage
- All Implemented Interfaces:
Serializable,quadbase.common.util.internal.IReportImage
- Direct Known Subclasses:
ReportChartObject,ReportGrid,ReportLine
public class ReportImage
extends ReportCell
implements quadbase.common.util.internal.IReportImage, Serializable
This class can be used to insert images anywhere in the Report--in the ReportSection, or
ReportTable.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThis constant is only used for the background image.static final Stringstatic final intThis constant is only used for the background image.static final intThis constant is only used for the background image.static final StringFields 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
ConstructorsConstructorDescriptionConstructs a ReportImage with no labelReportImage(String name) Constructs a ReportImage with the specified label -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTemplate(ReportImage _cell) Specifies the look invalid input: '&' feel to be the same as another ReportImage object.voidapplyTemplate(ReportImage _cell, boolean applyScript) Specifies the look invalid input: '&' feel to be the same as another ReportImage object.voidcopy(ReportImage _cell) Specifies this ReportImage to be the same as "_cell"voidcopyTemplate(ReportImage _cell) For internal use only.static ReportImagecreateImage(DataInput in, int version) For internal use only.static ReportImagecreateImage(DataInput in, int version, boolean pack, quadbase.common.util.internal.FileInMemTable subFilesTable) For internal use only.static ReportImagecreateImage(Node node, int version) For internal use only.quadbase.common.util.internal.IReportImagecreateReportImage(String name) internal use only Constructs a ReportImage with the specified labelvoiddeepCopy(ReportImage _cell) internal use onlybooleanequals(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.intfloatintThis method is only used for the background image.Gets the image PATHintGets the image format of this image (GIF, PNG, JPEG, etc...) SeeIExportConstantsfor possible returned values.Gets the URL associated with this image.intSince JPEG uses compression, which decimates the quality of the image, this method gets the JPEG quality index, default is 99.intGets the image format of this image (GIF, PNG, JPEG, etc...) when the report is exported as a PDF file.intGets the PNG compression index, default is 0.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)Gets the path to the image on diskgets the URL location to the image.booleaninternal use only Returns whether this image is stored in the database.booleanGets the state of GIF transparent mode.voidFor internal use only.voidread(DataInput in, int version, boolean pack, quadbase.common.util.internal.FileInMemTable subFilesTable) internal use only.voidFor internal use only.voidsetBytes(byte[] b) Set the bytes to be used as this image's data.voidvoidsetDBImage(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.voidsetFlashFrameCount(int ct) voidsetFlashFrameRate(float rate) voidsetGIFTransparent(boolean b) Sets the state of GIF transparent mode.voidsetHTMLParameters(String dirLocation, String url, String fileName) Sets some options for outputting in HTMLvoidsetImageOption(int i) This method is only used for the background image.voidsetImagePath(String path) Sets the image PATHvoidsetImagePath(String path, boolean setBytes) voidsetImageType(int type) Sets the image format of this image (GIF, PNG, JPEG, etc...) SeeIExportConstantsfor possible parameter values.voidsetImageURL(URL url) Sets the image URLvoidsetImageURL(URL url, boolean setBytes) voidsetJPEGQuality(int q) Since JPEG uses compression, which decimates the quality of the image, this method sets the JPEG quality index, default is 99.voidsetPdfImageType(int type) Sets the image format of this image (GIF, PNG, JPEG, etc...) when the report is exported as a PDF file.voidsetPNGCompression(int q) Sets the PNG compression index, default is 0.voidsetRelativePath(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)toString()internal use onlyvoidwrite(DataOutput out) For internal use only.voidwrite(DataOutput out, boolean pack) internal use onlyprotected voidwriteImageData(DataOutput out, boolean pack) Writes image data to a file specified in the imageURL field.voidFor internal use only.Methods inherited from class quadbase.reportdesigner.ReportElements.ReportCell
applyStyle, applyStyleButNotWH, applyStyleButNotWHCopyScripts, 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, setScriptedValueMethods inherited from class quadbase.reportdesigner.ReportElements.ReportElement
addSecurityLevel, applyImageTemplate, applyImageTemplateExceptBound, applySecurity, applyStyle, applyStyleButNotWH, applyTemplate, applyTemplate, applyTemplate, contains, contains, containsX, containsY, copy, copyStyleWithScriptsButNotWH, 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, 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
-
Field Details
-
DBImageDir
- See Also:
-
XMLTAG
- See Also:
-
CENTER
public static final int CENTERThis 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:
-
FIT
public static final int FITThis constant is only used for the background image. It specifies the background image to be resized to fit the entire page.- See Also:
-
TILE
public static final int TILEThis constant is only used for the background image. It specifies the background image to tile to fill the entire page.- See Also:
-
-
Constructor Details
-
ReportImage
public ReportImage()Constructs a ReportImage with no label -
ReportImage
Constructs a ReportImage with the specified label- Parameters:
name- name of the new ReportImage object
-
-
Method Details
-
copy
Specifies this ReportImage to be the same as "_cell"- Parameters:
_cell- the ReportImage object being emulated
-
deepCopy
internal use only -
copyTemplate
For internal use only. -
applyTemplate
Specifies the look invalid input: '&' feel to be the same as another ReportImage object.- Parameters:
_cell- the ReportImage object being emulated
-
applyTemplate
Specifies the look invalid input: '&' feel to be the same as another ReportImage object.- Parameters:
applyScript- If true, the script text of the object will also be applied.
-
equals
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...) SeeIExportConstantsfor possible returned values. -
setImageType
public void setImageType(int type) Sets the image format of this image (GIF, PNG, JPEG, etc...) SeeIExportConstantsfor 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. SeeIExportConstantsfor 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. SeeIExportConstantsfor 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. Seequadbase.ChartAPI.IExportConstantsfor possible values (eg. quadbase.ChartAPI.IExportConstants.PNG_COMPRESSION_FAST). -
setPNGCompression
public void setPNGCompression(int q) Sets the PNG compression index, default is 0. Seequadbase.ChartAPI.IExportConstantsfor 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
Gets the URL associated with this image.- Returns:
- URL the URL of the location of the image.
-
setImageURL
Sets the image URL- Specified by:
setImageURLin interfacequadbase.common.util.internal.IReportImage- Parameters:
url- the URL location of the image.
-
setImageURL
- Specified by:
setImageURLin interfacequadbase.common.util.internal.IReportImage
-
getImagePath
Gets the image PATH- Returns:
- image PATH
-
setImagePath
Sets the image PATH- Parameters:
path- image the path to this image
-
setImagePath
-
setBytes
-
setHTMLParameters
Sets some options for outputting in HTML- Parameters:
dirLocation- path to the image on diskurl- URL location to the imagefileName- the name of the image file.
-
getSavedFileLocation
Gets the path to the image on disk -
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:
setDBImagein interfacequadbase.common.util.internal.IReportImage
-
isDBImage
public boolean isDBImage()internal use only Returns whether this image is stored in the database. -
setRelativePath
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:
setRelativePathin interfacequadbase.common.util.internal.IReportImage
-
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:
getRelativePathin interfacequadbase.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
For internal use only.- Overrides:
writein classReportCell- Throws:
IOException
-
write
internal use only- Throws:
IOException
-
writeImageData
Writes image data to a file specified in the imageURL field.- Parameters:
pack- If true, the image is written in 2KB blocks- Throws:
IOException
-
writeXML
For internal use only.- Overrides:
writeXMLin classReportCell- Throws:
IOException
-
createImage
For internal use only.- Throws:
Exception
-
readXML
For internal use only.- Overrides:
readXMLin classReportCell- Throws:
Exception
-
createImage
For internal use only.- Throws:
Exception
-
createImage
public static ReportImage createImage(DataInput in, int version, boolean pack, quadbase.common.util.internal.FileInMemTable subFilesTable) throws Exception For internal use only.- Throws:
Exception
-
read
For internal use only.- Overrides:
readin classReportCell- Throws:
Exception
-
read
public void read(DataInput in, int version, boolean pack, quadbase.common.util.internal.FileInMemTable subFilesTable) throws Exception internal use only.- Throws:
Exception
-
toString
internal use only -
createReportImage
internal use only Constructs a ReportImage with the specified label- Specified by:
createReportImagein interfacequadbase.common.util.internal.IReportImage- Parameters:
name- name of the new ReportImage object
-