i-net Clear Reports

com.inet.report
Class Picture

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.Picture
All Implemented Interfaces:
BorderProperties, GeneralProperties, HyperlinkProperties, NodeParser, PictureProperties, com.inet.report.ReferenceHolder, java.io.Serializable, java.lang.Cloneable

public class Picture
extends AbstractPictureElement

This class represent a static picture. For example you can set a special logo at runtime on all of your reports. To add a picture to your report use method Section.addPicture(int, int, int, int, java.awt.image.BufferedImage) in class Section and give size, position and the filename of the picture.

This class is part of the RDC.

See Also:
Section.addPicture(int, int, int, int, java.io.File), Section.addPicture(int, int, int, int, java.awt.image.BufferedImage), Section.remove(Element), Section.getElements(), Section.getElementsV(), Serialized Form

Field Summary
 
Fields inherited from class com.inet.report.Element
BOX, CHART, CROSSTAB, CROSSTABCELL, CROSSTABCOLUMN, CROSSTABROW, CROSSTABSECTION, DATABASE_PICTURE, FIELD, FIELDPART, FORMFIELD, INTERACTIVE_SORTING, 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
 java.lang.Object copy()
          Creates a serializable copy of this Element.
 com.inet.report.encode.PictureMetaData createPictureMetaData()
          Creates a meta data instance for this picture.
 double getHeightRenderingFactor()
          Gets the property 'height rendering factor'.
 java.awt.Image getImage()
          Returns the java.awt.Image of this picture element.
 FormulaField getImageLocationFormula()
          Returns the formula for the "image location" property
 double getWidthRenderingFactor()
          Gets the property 'width rendering factor'.
 void setImageLocationFormula(FormulaField newFormula)
          Use this formula to exchange the source of the image dynamically at runtime.
 
Methods inherited from class com.inet.report.AbstractPictureElement
createPreviewImage, 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, 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, getBottomLineStyle, getBottomLineStyleFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getForeColor, getForeColorFormula, getLeftLineStyle, getLeftLineStyleFormula, getRightLineStyle, getRightLineStyleFormula, getTightHorizontalFormula, getTopLineStyle, getTopLineStyleFormula, isCloseBorderOnPageBreak, isDropShadow, isTightHorizontal, setBackColor, setBackColorFormula, setBottomLineStyle, setBottomLineStyleFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setForeColor, setForeColorFormula, setLeftLineStyle, setLeftLineStyleFormula, setRightLineStyle, setRightLineStyleFormula, setTightHorizontal, setTightHorizontalFormula, setTopLineStyle, setTopLineStyleFormula
 
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, parseElement, parseEndElement, parseText
 

Method Detail

copy

public java.lang.Object copy()
                      throws ReportException
Creates a serializable copy of this Element. The returned Object is not an instance of Element. This method is used from i-net Designer for Copy & Paste.

Overrides:
copy in class Element
Returns:
A serializable Object.
Throws:
ReportException - If accessing properties of this Element causes any errors.
See Also:
Section.pasteElement(java.lang.Object)

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%.

setImageLocationFormula

public void setImageLocationFormula(FormulaField newFormula)
Use this formula to exchange the source of the image dynamically at runtime. The formula should return an url which specifies the image location of the replacing image. If the url doesnt point to a valid image file the origninal image wont be replaced.

Parameters:
newFormula - A string fomula which represents the image url of the replacing image.

getImageLocationFormula

public FormulaField getImageLocationFormula()
Returns the formula for the "image location" property

Returns:
Formula field for the "image location" property
See Also:
setImageLocationFormula(FormulaField)

getImage

public java.awt.Image getImage()
Returns the java.awt.Image of this picture element.

Returns:
The java.awt.Image of this picture element.

createPictureMetaData

public com.inet.report.encode.PictureMetaData createPictureMetaData()
Creates a meta data instance for this picture.

Returns:
the created meta data instance or null if no meta data can be retrieved (e.g. when picture data is missing or the data format is unknown)

i-net Clear Reports

Copyright © 1999-2015 by i-net software GmbH