i-net Clear Reports

com.inet.report
Class DatabasePicture

java.lang.Object
  extended by com.inet.report.ReportComponent
      extended by com.inet.report.Element
          extended by com.inet.report.AbstractPictureElement
              extended by com.inet.report.DatabasePicture
All Implemented Interfaces:
BorderProperties, GeneralProperties, HyperlinkProperties, NodeParser, PictureProperties, com.inet.report.ReferenceHolder, java.io.Serializable, java.lang.Cloneable

public class DatabasePicture
extends AbstractPictureElement

It represents a picture that is saved in a BLOB of the database. The picture data must save as gif, jpg, bmp, wmf, or OLE of this formats.

This class is part of the RDC.

See Also:
Section.addDatabasePicture(Field, int, int, int, int), Serialized Form

Field Summary
 
Fields inherited from class com.inet.report.Element
BOX, CHART, CROSSTAB, CROSSTABCELL, CROSSTABCOLUMN, CROSSTABROW, CROSSTABSECTION, DATABASE_PICTURE, FIELD, FIELDPART, JAVABEAN, LINE, PARAGRAPH, PICTURE, SIGNATURE, SUBREPORT, TEXT, TEXTPART
 
Fields inherited from interface com.inet.report.PictureProperties
ALIGN_VERTICAL_BOTTOM, ALIGN_VERTICAL_CENTER, ALIGN_VERTICAL_TOP, SCALE_BEST_FIT_KEEP_ASPECT_RATIO, SCALE_FIT_HEIGHT_KEEP_ASPECT_RATIO, SCALE_FIT_WIDTH_FIT_HEIGHT, SCALE_FIT_WIDTH_FIXED_HEIGHT, SCALE_FIT_WIDTH_KEEP_ASPECT_RATIO, SCALE_FIXED_WIDTH_FIT_HEIGHT, SCALE_FIXED_WIDTH_FIXED_HEIGHT
 
Fields inherited from interface com.inet.report.BorderProperties
LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_DOUBLE, LINE_STYLE_SINGLE, NO_LINE
 
Fields inherited from interface com.inet.report.GeneralProperties
ALIGN_HORIZONTAL_CENTER, ALIGN_HORIZONTAL_DEFAULT, ALIGN_HORIZONTAL_JUSTIFIED, ALIGN_HORIZONTAL_LEFT, ALIGN_HORIZONTAL_RIGHT
 
Method Summary
 double getHeightRenderingFactor()
          Gets the property 'height rendering factor'.
 java.awt.Image getImage(byte[] data, boolean errorImage)
          convert the given data to an image
static java.awt.Image getImageStatic(byte[] data, boolean errorImage)
          convert the given data to an image
 double getWidthRenderingFactor()
          Gets the property 'width rendering factor'.
 NodeParser parseElement(com.inet.report.parser.XMLTag group, java.lang.String tag, org.xml.sax.Attributes atts, java.util.Map parserMap)
          FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XML Parses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself.
 
Methods inherited from class com.inet.report.AbstractPictureElement
getBottomCropping, getCanShrinkFormula, getHeightScalingFactor, getImageKeyFormula, getLeftCropping, getPropertyFormulas, getRightCropping, getScalingOption, getTopCropping, getVerAlign, getVerAlignFormula, getWidthScalingFactor, isCanShrink, setBottomCropping, setCanShrink, setCanShrinkFormula, setHeightScalingFactor, setHorAlign, setImageKeyFormula, setLeftCropping, setRightCropping, setScalingOption, setSuppressIfDuplicated, setSuppressIfDuplicatedFormula, setTopCropping, setVerAlign, setVerAlignFormula, setWidthScalingFactor
 
Methods inherited from class com.inet.report.Element
addListener, copy, copyXML2, getBottomLineStyle, getBottomLineStyleFormula, getCanGrowCount, getCanGrowFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getEngine, getField, getForeColor, getForeColorFormula, getHorAlign, getHorAlignFormula, getHyperlinkUrl, getHyperlinkUrlFormula, getLeftLineStyle, getLeftLineStyleFormula, getParent, getRightLineStyle, getRightLineStyleFormula, getSuppressIfDuplicatedFormula, getTightHorizontalFormula, getToolTipsText, getToolTipsTextFormula, getTopLineStyle, getTopLineStyleFormula, indexOf, isCanGrow, isCloseBorderOnPageBreak, isDropShadow, isSuppressIfDuplicated, isTightHorizontal, paramString, removeListener, setBottomLineStyle, setBottomLineStyleFormula, setCanGrow, setCanGrowCount, setCanGrowFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setField, setForeColor, setForeColorFormula, setHorAlignFormula, setHyperlinkUrl, setHyperlinkUrlFormula, setIndex, setLeftLineStyle, setLeftLineStyleFormula, setRightLineStyle, setRightLineStyleFormula, setTightHorizontal, setTightHorizontalFormula, setToolTipsText, setToolTipsTextFormula, setTopLineStyle, setTopLineStyleFormula
 
Methods inherited from class com.inet.report.ReportComponent
getBackColor, getBackColorFormula, getHeight, getKeepTogetherFormula, getSuppressFormula, getType, getWidth, getX, getY, isKeepTogether, isSuppress, setBackColor, setBackColorFormula, setHeight, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula, setWidth, setX, setY
 
Methods inherited from interface com.inet.report.PictureProperties
getCanGrowFormula, getHeight, getHorAlign, getHorAlignFormula, getWidth, isCanGrow, setCanGrow, setCanGrowFormula, setHeight, setHorAlignFormula, setWidth
 
Methods inherited from interface com.inet.report.HyperlinkProperties
getHyperlinkUrl, getHyperlinkUrlFormula, setHyperlinkUrl, setHyperlinkUrlFormula
 
Methods inherited from interface com.inet.report.BorderProperties
getBackColor, getBackColorFormula, setBackColor, setBackColorFormula
 
Methods inherited from interface com.inet.report.GeneralProperties
getKeepTogetherFormula, getSuppressFormula, isKeepTogether, isSuppress, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula
 
Methods inherited from interface com.inet.report.parser.NodeParser
isDOMParser, parseDOM, parseEndElement, parseText
 

Method Detail

getImage

public java.awt.Image getImage(byte[] data,
                               boolean errorImage)
convert the given data to an image

Parameters:
data - the data which forms the image (as aquired from the blob field)
errorImage - if true return the error image, otherwise return null in case of errors
Returns:
the resulting image or null / an error image if some problem is encountered

getImageStatic

public static java.awt.Image getImageStatic(byte[] data,
                                            boolean errorImage)
convert the given data to an image

Parameters:
data - the data which forms the image (as aquired from the blob field)
errorImage - if true return the error image, otherwise return null in case of errors
Returns:
the resulting image or null / an error image if some problem is encountered

getWidthRenderingFactor

public double getWidthRenderingFactor()
Gets the property 'width rendering factor'. While 'width scaling factor' is a user defined faction this rendering factor includes the user factor and the image resolution if available. Otherwise it is equal to width scaling factor

Returns:
The value of the property 'width scaling factor'. I.e. 0.1 means 10%, 5.0 means 500%.

getHeightRenderingFactor

public double getHeightRenderingFactor()
Gets the property 'height rendering factor'. While 'height scaling factor' is a user defined factor, this rendering factor includes the user factor and the image resolution if available. Otherwise it is equal to height scaling factor.

Returns:
The value of the property 'height scaling factor'. I.e. 0.1 means 10%, 5.0 means 500%.

parseElement

public NodeParser parseElement(com.inet.report.parser.XMLTag group,
                               java.lang.String tag,
                               org.xml.sax.Attributes atts,
                               java.util.Map parserMap)
                        throws FatalParserException
FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XML

Parses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself. Note that the parsing is highly tolerant, i.e. exceptions are intercepted and suppressed if at all possible.

Specified by:
parseElement in interface NodeParser
Parameters:
group - XMLTag of the current node to be parsed, or null if there is no such current group. An XMLTag is a group of nodes bundled together, usually it is a Properties node such as CommonProperties, BorderProperties, etc.
tag - The XMLTag to be parsed
atts - The set of attributes in the current XMLTag
parserMap - The map of current Parser.
Returns:
The NodeParser sub-element if one needed to be created, or null if none was created.
Throws:
FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH