i-net Clear Reports

com.inet.report
Class AbstractPictureElement

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

public abstract class AbstractPictureElement
extends Element
implements PictureProperties, HyperlinkProperties, BorderProperties

Parent class of all elements which shows a picture. This class implements PictureProperties interface.

Since:
6.0
See Also:
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.awt.Image createPreviewImage(com.inet.report.encode.PictureMetaData metaData)
          Creates a preview image of this picture.
 int getBottomCropping()
          Gets the value of the property 'bottom cropping size'.
 FormulaField getCanShrinkFormula()
          Returns the formula of the property 'can shrink'.
 double getHeightScalingFactor()
          Gets the property 'height scaling factor'.
 FormulaField getImageKeyFormula()
          Return the image key formula for this picture.
 int getLeftCropping()
          Gets the value of the property 'left cropping size'.
 java.util.List getPropertyFormulas()
          Returns a list with all property formulas that are set for this report element.
 int getRightCropping()
          Gets the value of the property 'right cropping size'.
 int getScalingOption()
          Gets the scaling option which represents the way to scale the source image into its element frame.
 int getTopCropping()
          Gets the value of the property 'top cropping size'.
 int getVerAlign()
          Returns the value of the property 'vertical alignment'.
 FormulaField getVerAlignFormula()
          Gets the formula for the property 'vertical alignment'.
 double getWidthScalingFactor()
          Gets the property 'width scaling factor'.
 boolean isCanShrink()
          Returns the value of the property 'can shrink'.
 void setBottomCropping(int bottomCropping)
          Sets the value of the property 'bottom cropping size'.
 void setCanShrink(boolean canShrink)
          Sets the value of the property 'can shrink'.
 void setCanShrinkFormula(FormulaField newFormula)
          Sets the formula for the property 'can shrink'.
 void setHeightScalingFactor(double factor)
          Sets the property 'height scaling factor'.
 void setHorAlign(int value)
          Sets the value of the property 'horizontal alignment'.
 void setImageKeyFormula(FormulaField newFormula)
          Sets a Formulafield which contains a key string to identify identical images.
 void setLeftCropping(int leftCropping)
          Sets the value of the property 'left cropping size'.
 void setRightCropping(int rightCropping)
          Sets the value of the property 'right cropping size'.
 void setScalingOption(int option)
          Sets the scaling option which represents the way to scale the source image into its element frame.
 void setSuppressIfDuplicated(boolean newValue)
          The property 'suppress if duplicated' is not defined for instances of AbstractPictureElement.
 void setSuppressIfDuplicatedFormula(FormulaField newFormula)
          The property 'suppress if duplicated' is not defined for instances of AbstractPictureElement.
 void setTopCropping(int topCropping)
          Sets the value of the property 'top cropping size'.
 void setVerAlign(int value)
          Sets the value of the property 'vertical alignment'.
 void setVerAlignFormula(FormulaField newFormula)
          Sets the formula for the property 'vertical alignment'.
 void setWidthScalingFactor(double factor)
          Sets the property 'width scaling factor'.
 
Methods inherited from class com.inet.report.Element
addListener, copy, 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
createPictureMetaData, getCanGrowFormula, getHeight, getHeightRenderingFactor, getHorAlign, getHorAlignFormula, getWidth, getWidthRenderingFactor, 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

setSuppressIfDuplicated

public void setSuppressIfDuplicated(boolean newValue)
The property 'suppress if duplicated' is not defined for instances of AbstractPictureElement. Setting this property will have no effect.

Specified by:
setSuppressIfDuplicated in interface GeneralProperties
Overrides:
setSuppressIfDuplicated in class Element
Parameters:
newValue - This has no effect.

setSuppressIfDuplicatedFormula

public void setSuppressIfDuplicatedFormula(FormulaField newFormula)
The property 'suppress if duplicated' is not defined for instances of AbstractPictureElement. Setting this property will have no effect.

Specified by:
setSuppressIfDuplicatedFormula in interface GeneralProperties
Overrides:
setSuppressIfDuplicatedFormula in class Element
Parameters:
newFormula - This has no effect.

setBottomCropping

public void setBottomCropping(int bottomCropping)
Sets the value of the property 'bottom cropping size'.

Specified by:
setBottomCropping in interface PictureProperties
Parameters:
bottomCropping - The long value of the property 'bottom cropping size'.

getBottomCropping

public int getBottomCropping()
Gets the value of the property 'bottom cropping size'.

Specified by:
getBottomCropping in interface PictureProperties
Returns:
The long value of the property 'bottom cropping size'.

setLeftCropping

public void setLeftCropping(int leftCropping)
Sets the value of the property 'left cropping size'.

Specified by:
setLeftCropping in interface PictureProperties
Parameters:
leftCropping - The value of the property 'left cropping size'.

getLeftCropping

public int getLeftCropping()
Gets the value of the property 'left cropping size'.

Specified by:
getLeftCropping in interface PictureProperties
Returns:
The value of the property 'left cropping size'.

setRightCropping

public void setRightCropping(int rightCropping)
Sets the value of the property 'right cropping size'.

Specified by:
setRightCropping in interface PictureProperties
Parameters:
rightCropping - The long value of the property 'right cropping size'.

getRightCropping

public int getRightCropping()
Gets the value of the property 'right cropping size'.

Specified by:
getRightCropping in interface PictureProperties
Returns:
The value of the property 'right cropping size'.

setTopCropping

public void setTopCropping(int topCropping)
Sets the value of the property 'top cropping size'.

Specified by:
setTopCropping in interface PictureProperties
Parameters:
topCropping - The value of the property 'top cropping size'.

getTopCropping

public int getTopCropping()
Gets the value of the property 'top cropping size'.

Specified by:
getTopCropping in interface PictureProperties
Returns:
The long value of the property 'top cropping size'.

setWidthScalingFactor

public void setWidthScalingFactor(double factor)
Sets the property 'width scaling factor'.

Specified by:
setWidthScalingFactor in interface PictureProperties
Parameters:
factor - The value of the property 'width scaling factor'. I.e. 0.1 means 10%, 5.0 means 500%.

getWidthScalingFactor

public double getWidthScalingFactor()
Gets the property 'width scaling factor'.

Specified by:
getWidthScalingFactor in interface PictureProperties
Returns:
The value of the property 'width scaling factor'. I.e. 0.1 means 10%, 1.0 5.0 means 500%.

setHeightScalingFactor

public void setHeightScalingFactor(double factor)
Sets the property 'height scaling factor'.

Specified by:
setHeightScalingFactor in interface PictureProperties
Parameters:
factor - The value of the property 'height scaling factor'. I.e. 0.1 means 10%, 5.0 means 500%.

getHeightScalingFactor

public double getHeightScalingFactor()
Gets the property 'height scaling factor'.

Specified by:
getHeightScalingFactor in interface PictureProperties
Returns:
The value of the property 'height scaling factor'. I.e. 0.1 means 10%, 5.0 means 500%.

getVerAlignFormula

public FormulaField getVerAlignFormula()
Gets the formula for the property 'vertical alignment'. Possible alignments are default, top, center, or bottom.

Specified by:
getVerAlignFormula in interface PictureProperties
Returns:
The formula for the property 'vertical alignment'.
See Also:
PictureProperties.ALIGN_VERTICAL_TOP, PictureProperties.ALIGN_VERTICAL_CENTER, PictureProperties.ALIGN_VERTICAL_BOTTOM

setVerAlignFormula

public void setVerAlignFormula(FormulaField newFormula)
Sets the formula for the property 'vertical alignment'. Possible alignments are default, top, center, or bottom.

Specified by:
setVerAlignFormula in interface PictureProperties
Parameters:
newFormula - The new formula for the property 'horizontal alignment'.
See Also:
PictureProperties.ALIGN_VERTICAL_TOP, PictureProperties.ALIGN_VERTICAL_CENTER, PictureProperties.ALIGN_VERTICAL_BOTTOM

setVerAlign

public void setVerAlign(int value)
Sets the value of the property 'vertical alignment'. Possible alignments are default, left, center, right or justified.

Specified by:
setVerAlign in interface PictureProperties
Parameters:
value - The new value of the property 'vertical alignment'.
See Also:
PictureProperties.ALIGN_VERTICAL_TOP, PictureProperties.ALIGN_VERTICAL_CENTER, PictureProperties.ALIGN_VERTICAL_BOTTOM

getVerAlign

public int getVerAlign()
Returns the value of the property 'vertical alignment'. Possible alignments are default, left, center, right or justified.

Specified by:
getVerAlign in interface PictureProperties
Returns:
the 'vertical alignment' property of this element.
See Also:
PictureProperties.ALIGN_VERTICAL_TOP, PictureProperties.ALIGN_VERTICAL_CENTER, PictureProperties.ALIGN_VERTICAL_BOTTOM

getScalingOption

public int getScalingOption()
Gets the scaling option which represents the way to scale the source image into its element frame. E.g. PictureProperties.SCALE_FIT_WIDTH_FIXED_HEIGHT will scale the width of source image to the width of the element and the height by the given scale factor set using the PictureProperties.setHeightScalingFactor(double).

Specified by:
getScalingOption in interface PictureProperties
Returns:
An integer values which represents the scale option.
See Also:
PictureProperties.SCALE_FIT_WIDTH_FIT_HEIGHT, PictureProperties.SCALE_FIXED_WIDTH_FIXED_HEIGHT, PictureProperties.SCALE_FIXED_WIDTH_FIT_HEIGHT, PictureProperties.SCALE_FIT_WIDTH_FIXED_HEIGHT, PictureProperties.SCALE_FIT_WIDTH_KEEP_ASPECT_RATIO, PictureProperties.SCALE_FIT_HEIGHT_KEEP_ASPECT_RATIO, PictureProperties.SCALE_BEST_FIT_KEEP_ASPECT_RATIO

setScalingOption

public void setScalingOption(int option)
Sets the scaling option which represents the way to scale the source image into its element frame. E.g. PictureProperties.SCALE_FIT_WIDTH_FIXED_HEIGHT will scale the width of source image to the width of the element and the height by the given scale factor set using the PictureProperties.setHeightScalingFactor(double).

Specified by:
setScalingOption in interface PictureProperties
Parameters:
option - An integer, which represents the scaling option.
See Also:
PictureProperties.SCALE_FIT_WIDTH_FIT_HEIGHT, PictureProperties.SCALE_FIXED_WIDTH_FIXED_HEIGHT, PictureProperties.SCALE_FIXED_WIDTH_FIT_HEIGHT, PictureProperties.SCALE_FIT_WIDTH_FIXED_HEIGHT, PictureProperties.SCALE_FIT_WIDTH_KEEP_ASPECT_RATIO, PictureProperties.SCALE_FIT_HEIGHT_KEEP_ASPECT_RATIO, PictureProperties.SCALE_BEST_FIT_KEEP_ASPECT_RATIO

isCanShrink

public boolean isCanShrink()
Returns the value of the property 'can shrink'. If this property is enabled an element with dynamic state will be shrunk when the content of the element is smaller than its container.

Specified by:
isCanShrink in interface PictureProperties
Returns:
The value of the property 'can shrink'.

setCanShrink

public void setCanShrink(boolean canShrink)
Sets the value of the property 'can shrink'. If this property is enabled an element with dynamic state will be shrunk when the content of the element is smaller than its container.

Specified by:
setCanShrink in interface PictureProperties
Parameters:
canShrink - If true shrinking to the image size is allowed.

getCanShrinkFormula

public FormulaField getCanShrinkFormula()
Returns the formula of the property 'can shrink'. If this property is enabled an element with dynamic state will be shrunk dynamically when the content of the element is larger than its container.

Specified by:
getCanShrinkFormula in interface PictureProperties
Returns:
FormulaField The formula of the property 'can grow'.

setCanShrinkFormula

public void setCanShrinkFormula(FormulaField newFormula)
Sets the formula for the property 'can shrink'. If this property is enabled an element with dynamic state will be shrunk dynamically when then content of the element is larger than its container.

Specified by:
setCanShrinkFormula in interface PictureProperties
Parameters:
newFormula - The new formula for the property 'can grow'.

getPropertyFormulas

public java.util.List getPropertyFormulas()
Returns a list with all property formulas that are set for this report element.

Overrides:
getPropertyFormulas in class Element
Returns:
List of property formulas

setHorAlign

public void setHorAlign(int value)
Sets the value of the property 'horizontal alignment'. Possible alignments are default, left, center or right.

Specified by:
setHorAlign in interface GeneralProperties
Specified by:
setHorAlign in interface PictureProperties
Overrides:
setHorAlign in class Element
Parameters:
value - The new value of the property 'horizontal alignment'.
Throws:
java.lang.IllegalArgumentException - when parameter 'value' is none of the four possible horizontal alignments
See Also:
GeneralProperties.ALIGN_HORIZONTAL_DEFAULT, GeneralProperties.ALIGN_HORIZONTAL_LEFT, GeneralProperties.ALIGN_HORIZONTAL_CENTER, GeneralProperties.ALIGN_HORIZONTAL_RIGHT

getImageKeyFormula

public FormulaField getImageKeyFormula()
Return the image key formula for this picture. Renderers which are using a cache mechanism (e.g. PDF) can use this key to optimize its rendering and memory performance. Picture Objects with the same key will be treated as the picture objects with the same image.

Specified by:
getImageKeyFormula in interface PictureProperties
Returns:
Return the image key formula for this picture.

setImageKeyFormula

public void setImageKeyFormula(FormulaField newFormula)
Sets a Formulafield which contains a key string to identify identical images. Renderers which are using a cache mechanism (e.g. PDF) can use this key to optimize its rendering and memory performance. Picture Objects with the same key will be treated as the picture objects with the same image.

Specified by:
setImageKeyFormula in interface PictureProperties
Parameters:
newFormula - the formula containing the image key.

createPreviewImage

public java.awt.Image createPreviewImage(com.inet.report.encode.PictureMetaData metaData)
Creates a preview image of this picture. The image is scaled and aligned to the properties of this model object only if PictureMetaData.isAutoScaledAndAligned() returns true for this picture format.

Parameters:
metaData - a meta data instance created by PictureProperties.createPictureMetaData()
Returns:
the created preview image
Throws:
java.lang.IllegalArgumentException - if the specified meta data instance is not valid
Since:
12.1

i-net Clear Reports

Copyright © 1999-2015 by i-net software GmbH