i-net Clear Reports

com.inet.report
Interface PictureProperties

All Known Implementing Classes:
AbstractPictureElement, DatabasePicture, Picture

public interface PictureProperties

Interface for elements that display pictures.
This class is part of the RDC.

Since:
6.5

Field Summary
static int ALIGN_VERTICAL_BOTTOM
          The vertical alignment will be bottom aligned.
static int ALIGN_VERTICAL_CENTER
          The vertical alignment will be centered.
static int ALIGN_VERTICAL_TOP
          The vertical alignment will be top aligned.
static int SCALE_BEST_FIT_KEEP_ASPECT_RATIO
          Scales the source image to fit in the bounds of its element size while keeping the correct aspect ratio.
static int SCALE_FIT_HEIGHT_KEEP_ASPECT_RATIO
          Scales the height of the source image to its element size while keeping the correct aspect ratio.
static int SCALE_FIT_WIDTH_FIT_HEIGHT
          Stretches the source image to the element frame
static int SCALE_FIT_WIDTH_FIXED_HEIGHT
          Scales the width of the source image to its element size and the height using the given scale factor.
static int SCALE_FIT_WIDTH_KEEP_ASPECT_RATIO
          Scales the width of the source image to its element size while keeping the correct aspect ratio.
static int SCALE_FIXED_WIDTH_FIT_HEIGHT
          Scales the width of the source image by the given scaling factor and scales its height to the height of the element.
static int SCALE_FIXED_WIDTH_FIXED_HEIGHT
          Scales the source image by the given scaling factor
 
Method Summary
 com.inet.report.encode.PictureMetaData createPictureMetaData()
          Creates a meta data instance for this picture.
 int getBottomCropping()
          Gets the value of the property 'bottom cropping size'.
 FormulaField getCanGrowFormula()
          Returns the formula of the property 'can grow'.
 FormulaField getCanShrinkFormula()
          Returns the formula of the property 'can shrink'.
 int getHeight()
          Gets the height of an element.
 double getHeightRenderingFactor()
          Gets the property 'height rendering factor'.
 double getHeightScalingFactor()
          Gets the property 'height scaling factor'.
 int getHorAlign()
          Returns the value of the property 'horizontal alignment'.
 FormulaField getHorAlignFormula()
          Returns the formula for the property 'horizontal alignment'.
 FormulaField getImageKeyFormula()
          Return the image key formula for this picture.
 int getLeftCropping()
          Gets the value of the property 'left cropping size'.
 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'.
 int getWidth()
          Gets the width of an element.
 double getWidthRenderingFactor()
          Gets the property 'width rendering factor'.
 double getWidthScalingFactor()
          Gets the property 'width scaling factor'.
 boolean isCanGrow()
          Returns the value of the property 'can grow'.
 boolean isCanShrink()
          Returns the value of the property 'can shrink'.
 void setBottomCropping(int bottomCropping)
          Sets the value of the property 'bottom cropping size'.
 void setCanGrow(boolean canGrow)
          Sets the value of the property 'can grow'.
 void setCanGrowFormula(FormulaField newFormula)
          Sets the formula for the property 'can grow'.
 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 setHeight(int height)
          Sets the height of an element.
 void setHeightScalingFactor(double factor)
          Sets the property 'height scaling factor'.
 void setHorAlign(int value)
          Sets the value of the property 'horizontal alignment'.
 void setHorAlignFormula(FormulaField newFormula)
          Sets the formula for 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 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 setWidth(int width)
          Sets the width of an element.
 void setWidthScalingFactor(double factor)
          Sets the property 'width scaling factor'.
 

Field Detail

ALIGN_VERTICAL_TOP

static final int ALIGN_VERTICAL_TOP
The vertical alignment will be top aligned.

Since:
7.0
See Also:
Constant Field Values

ALIGN_VERTICAL_CENTER

static final int ALIGN_VERTICAL_CENTER
The vertical alignment will be centered.

Since:
7.0
See Also:
Constant Field Values

ALIGN_VERTICAL_BOTTOM

static final int ALIGN_VERTICAL_BOTTOM
The vertical alignment will be bottom aligned.

Since:
7.0
See Also:
Constant Field Values

SCALE_FIT_WIDTH_FIT_HEIGHT

static final int SCALE_FIT_WIDTH_FIT_HEIGHT
Stretches the source image to the element frame

See Also:
Constant Field Values

SCALE_FIXED_WIDTH_FIXED_HEIGHT

static final int SCALE_FIXED_WIDTH_FIXED_HEIGHT
Scales the source image by the given scaling factor

See Also:
Constant Field Values

SCALE_FIT_WIDTH_FIXED_HEIGHT

static final int SCALE_FIT_WIDTH_FIXED_HEIGHT
Scales the width of the source image to its element size and the height using the given scale factor.

See Also:
Constant Field Values

SCALE_FIXED_WIDTH_FIT_HEIGHT

static final int SCALE_FIXED_WIDTH_FIT_HEIGHT
Scales the width of the source image by the given scaling factor and scales its height to the height of the element.

See Also:
Constant Field Values

SCALE_FIT_WIDTH_KEEP_ASPECT_RATIO

static final int SCALE_FIT_WIDTH_KEEP_ASPECT_RATIO
Scales the width of the source image to its element size while keeping the correct aspect ratio.

See Also:
Constant Field Values

SCALE_FIT_HEIGHT_KEEP_ASPECT_RATIO

static final int SCALE_FIT_HEIGHT_KEEP_ASPECT_RATIO
Scales the height of the source image to its element size while keeping the correct aspect ratio.

See Also:
Constant Field Values

SCALE_BEST_FIT_KEEP_ASPECT_RATIO

static final int SCALE_BEST_FIT_KEEP_ASPECT_RATIO
Scales the source image to fit in the bounds of its element size while keeping the correct aspect ratio.

See Also:
Constant Field Values
Method Detail

setBottomCropping

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

Parameters:
bottomCropping - The long value of the property 'bottom cropping size'.

getBottomCropping

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

Returns:
The long value of the property 'bottom cropping size'.

setLeftCropping

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

Parameters:
leftCropping - The value of the property 'left cropping size'.

getLeftCropping

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

Returns:
The value of the property 'left cropping size'.

setRightCropping

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

Parameters:
rightCropping - The long value of the property 'right cropping size'.

getRightCropping

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

Returns:
The value of the property 'right cropping size'.

setTopCropping

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

Parameters:
topCropping - The value of the property 'top cropping size'.

getTopCropping

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

Returns:
The long value of the property 'top cropping size'.

getScalingOption

int getScalingOption()
Gets the scaling option which represents the way to scale the source image into its element frame. E.g. 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 setHeightScalingFactor(double).

Returns:
An integer values which represents the scale option.
See Also:
SCALE_FIT_WIDTH_FIT_HEIGHT, SCALE_FIXED_WIDTH_FIXED_HEIGHT, SCALE_FIXED_WIDTH_FIT_HEIGHT, SCALE_FIT_WIDTH_FIXED_HEIGHT, SCALE_FIT_WIDTH_KEEP_ASPECT_RATIO, SCALE_FIT_HEIGHT_KEEP_ASPECT_RATIO, SCALE_BEST_FIT_KEEP_ASPECT_RATIO

setScalingOption

void setScalingOption(int option)
Sets the scaling option which represents the way to scale the source image into its element frame. E.g. 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 setHeightScalingFactor(double).

Parameters:
option - An integer, which represents the scaling option.
See Also:
SCALE_FIT_WIDTH_FIT_HEIGHT, SCALE_FIXED_WIDTH_FIXED_HEIGHT, SCALE_FIXED_WIDTH_FIT_HEIGHT, SCALE_FIT_WIDTH_FIXED_HEIGHT, SCALE_FIT_WIDTH_KEEP_ASPECT_RATIO, SCALE_FIT_HEIGHT_KEEP_ASPECT_RATIO, SCALE_BEST_FIT_KEEP_ASPECT_RATIO

getWidthScalingFactor

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

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

setWidthScalingFactor

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

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

setHeightScalingFactor

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

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

getHeightScalingFactor

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

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

getWidthRenderingFactor

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%.
Since:
8.2

getHeightRenderingFactor

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%.
Since:
8.2

getVerAlignFormula

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

Returns:
The formula for the property 'vertical alignment'.
See Also:
ALIGN_VERTICAL_TOP, ALIGN_VERTICAL_CENTER, ALIGN_VERTICAL_BOTTOM

setVerAlignFormula

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

Parameters:
newFormula - The new formula for the property 'horizontal alignment'.
See Also:
ALIGN_VERTICAL_TOP, ALIGN_VERTICAL_CENTER, ALIGN_VERTICAL_BOTTOM

setVerAlign

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

Parameters:
value - The new value of the property 'vertical alignment'.
See Also:
ALIGN_VERTICAL_TOP, ALIGN_VERTICAL_CENTER, ALIGN_VERTICAL_BOTTOM

getVerAlign

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

Returns:
the 'vertical alignment' property of this element.
See Also:
ALIGN_VERTICAL_TOP, ALIGN_VERTICAL_CENTER, ALIGN_VERTICAL_BOTTOM

isCanShrink

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.

Returns:
The value of the property 'can shrink'.
Since:
7.0

setCanShrink

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.

Parameters:
canShrink - If true shrinking to the image size is allowed.

getCanShrinkFormula

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.

Returns:
FormulaField The formula of the property 'can grow'.

setCanShrinkFormula

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.

Parameters:
newFormula - The new formula for the property 'can grow'.

setWidth

void setWidth(int width)
Sets the width of an element. The unit is in twips.

Parameters:
width - The width in twips.
Since:
7.0

getWidth

int getWidth()
Gets the width of an element. Use the 'element width' property to change the width of the element. The unit is in twips.

Returns:
The width in twips.
Throws:
java.lang.UnsupportedOperationException - if this element spans multiple sections
Since:
7.0

setHeight

void setHeight(int height)
Sets the height of an element. Use the 'element height' property to change the height of the element. The unit is in twips.

Parameters:
height - The height in twips.
Throws:
java.lang.UnsupportedOperationException - if this element spans multiple sections
Since:
7.0

getHeight

int getHeight()
Gets the height of an element. Use the 'element height' property to change the height of the element. The unit is in twips.

Returns:
The height in twips.
Throws:
java.lang.UnsupportedOperationException - if this element spans multiple sections
Since:
7.0

isCanGrow

boolean isCanGrow()
Returns the value of the property 'can grow'. If this property is enabled, an element with dynamic state will be expanded vertically if its content is larger than its container. If this property is disabled the content will be truncated when its size is larger than the container.

Returns:
The value of the property 'can grow'.
Since:
7.0

setCanGrow

void setCanGrow(boolean canGrow)
Sets the value of the property 'can grow'. If this property is enabled, an element with dynamic state will be expanded vertically if its content is larger than its container. If this property is disabled the content will be truncated when its size is larger than the container.

Parameters:
canGrow - The new value of the property 'can grow'
Since:
7.0

getCanGrowFormula

FormulaField getCanGrowFormula()
Returns the formula of the property 'can grow'. If this property is enabled, an element with dynamic state will be expanded vertically if its content is larger than its container. If this property is disabled the content will be truncated when its size is larger than the container.

Returns:
FormulaField The formula of the property 'can grow'.
Since:
7.0

setCanGrowFormula

void setCanGrowFormula(FormulaField newFormula)
Sets the formula for the property 'can grow'. If this property is enabled, an element with dynamic state will be expanded vertically if its content is larger than its container. If this property is disabled the content will be truncated when its size is larger than the container.

Parameters:
newFormula - The new formula for the property 'can grow'.
Since:
7.0

getHorAlignFormula

FormulaField getHorAlignFormula()
Returns the formula for the property 'horizontal alignment'. Possible alignments are default, left, center, right or justified.

Returns:
FormulaField The formula for the property 'horizontal alignment'.
Since:
7.0

setHorAlignFormula

void setHorAlignFormula(FormulaField newFormula)
Sets the formula for the property 'horizontal alignment'. Possible alignments are default, left, center, right or justified.

Parameters:
newFormula - The new formula for the property 'horizontal alignment'. The result of the formula should be in range from 0 to 4.
Since:
7.0
See Also:
GeneralProperties.ALIGN_HORIZONTAL_DEFAULT, GeneralProperties.ALIGN_HORIZONTAL_LEFT, GeneralProperties.ALIGN_HORIZONTAL_CENTER, GeneralProperties.ALIGN_HORIZONTAL_RIGHT, GeneralProperties.ALIGN_HORIZONTAL_JUSTIFIED

setHorAlign

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

Parameters:
value - The new value of the property 'horizontal alignment'.
Since:
7.0
See Also:
GeneralProperties.ALIGN_HORIZONTAL_DEFAULT, GeneralProperties.ALIGN_HORIZONTAL_LEFT, GeneralProperties.ALIGN_HORIZONTAL_CENTER, GeneralProperties.ALIGN_HORIZONTAL_RIGHT, GeneralProperties.ALIGN_HORIZONTAL_JUSTIFIED

getHorAlign

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

Returns:
Possible return values are default, left, center, right or justified.
Since:
7.0
See Also:
GeneralProperties.ALIGN_HORIZONTAL_DEFAULT, GeneralProperties.ALIGN_HORIZONTAL_LEFT, GeneralProperties.ALIGN_HORIZONTAL_CENTER, GeneralProperties.ALIGN_HORIZONTAL_RIGHT, GeneralProperties.ALIGN_HORIZONTAL_JUSTIFIED

setImageKeyFormula

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.

Parameters:
newFormula - the formula containing the image key.
Since:
9.2

getImageKeyFormula

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.

Returns:
Return the image key formula for this picture.
Since:
9.2

createPictureMetaData

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)
Since:
12.1

i-net Clear Reports

Copyright © 1999-2015 by i-net software GmbH