| net.sf.jasperreports.engine.JRImage
All known Subclasses: net.sf.jasperreports.engine.design.JRDesignImage, net.sf.jasperreports.engine.fill.JRFillImage, net.sf.jasperreports.engine.base.JRBaseImage,
JRImage | public interface JRImage extends JRGraphicElement,JRAnchor,JRHyperlink,JRAlignment,JRBox(Code) | | An abstract representation of a graphic element representing an image. Images can be aligned and scaled. They can
also contain hyperlinks or be anchors for other hyperlinks.
author: Teodor Danciu (teodord@users.sourceforge.net) version: $Id: JRImage.java 1229 2006-04-19 10:27:35Z teodord $ |
Field Summary | |
final public static byte | ON_ERROR_TYPE_BLANK A constant used for specifying that the engine should display blank space if the image is not found. | final public static byte | ON_ERROR_TYPE_ERROR A constant used for specifying that the engine should raise an exception if the image is not found. | final public static byte | ON_ERROR_TYPE_ICON A constant used for specifying that the engine should display a replacement icon if the image is not found. | final public static byte | SCALE_IMAGE_CLIP A constant value specifying that if the actual image is larger than the image element size, it will be cut off so
that it keeps its original resolution, and only the region that fits the specified size will be displayed. | final public static byte | SCALE_IMAGE_FILL_FRAME A constant value specifying that if the dimensions of the actual image do not fit those specified for the
image element that displays it, the image can be forced to obey them and stretch itself so that it fits
in the designated output area. | final public static byte | SCALE_IMAGE_RETAIN_SHAPE A constant value specifying that if the actual image does not fit into the image element, it can be adapted
to those dimensions without needing to change its original proportions. |
Method Summary | |
public JRBox | getBox() | public JRGroup | getEvaluationGroup() Indicates the evaluation time for this image. | public byte | getEvaluationTime() Indicates the evaluation time for this image. | public JRExpression | getExpression() Gets the evaluation group for this text field. | public byte | getOnErrorType() Indicates how the engine will treat a missing image. | public Byte | getOwnScaleImage() | public byte | getScaleImage() Gets the image scale type. | public boolean | isLazy() Indicates if the images will be loaded lazily or not. | public Boolean | isOwnUsingCache() Indicates if the engine is loading the current image from cache. | public boolean | isUsingCache() Indicates if the engine is loading the current image from cache. | public void | setLazy(boolean isLazy) Gives control over when the images are retrieved from their specified location. | public void | setOnErrorType(byte onErrorType) Specifies how the engine should treat a missing image. | public void | setScaleImage(byte scaleImage) Sets the image scale type. | public void | setScaleImage(Byte scaleImage) | public void | setUsingCache(boolean isUsingCache) Specifies if the engine should be loading the current image from cache. | public void | setUsingCache(Boolean isUsingCache) Specifies if the engine should be loading the current image from cache. |
ON_ERROR_TYPE_BLANK | final public static byte ON_ERROR_TYPE_BLANK(Code) | | A constant used for specifying that the engine should display blank space if the image is not found.
|
ON_ERROR_TYPE_ERROR | final public static byte ON_ERROR_TYPE_ERROR(Code) | | A constant used for specifying that the engine should raise an exception if the image is not found.
|
ON_ERROR_TYPE_ICON | final public static byte ON_ERROR_TYPE_ICON(Code) | | A constant used for specifying that the engine should display a replacement icon if the image is not found.
|
SCALE_IMAGE_CLIP | final public static byte SCALE_IMAGE_CLIP(Code) | | A constant value specifying that if the actual image is larger than the image element size, it will be cut off so
that it keeps its original resolution, and only the region that fits the specified size will be displayed.
|
SCALE_IMAGE_FILL_FRAME | final public static byte SCALE_IMAGE_FILL_FRAME(Code) | | A constant value specifying that if the dimensions of the actual image do not fit those specified for the
image element that displays it, the image can be forced to obey them and stretch itself so that it fits
in the designated output area.
|
SCALE_IMAGE_RETAIN_SHAPE | final public static byte SCALE_IMAGE_RETAIN_SHAPE(Code) | | A constant value specifying that if the actual image does not fit into the image element, it can be adapted
to those dimensions without needing to change its original proportions.
|
getBox | public JRBox getBox()(Code) | | Returns an object containing all border and padding properties for this text element
|
getEvaluationGroup | public JRGroup getEvaluationGroup()(Code) | | Indicates the evaluation time for this image.
one of the evaluation time constants in JRExpression |
getEvaluationTime | public byte getEvaluationTime()(Code) | | Indicates the evaluation time for this image.
one of the evaluation time constants in JRExpression |
getOnErrorType | public byte getOnErrorType()(Code) | | Indicates how the engine will treat a missing image.
one of the constants for missing image error types |
getOwnScaleImage | public Byte getOwnScaleImage()(Code) | | |
getScaleImage | public byte getScaleImage()(Code) | | Gets the image scale type.
one of the scale constants in this class |
isLazy | public boolean isLazy()(Code) | | Indicates if the images will be loaded lazily or not.
|
isOwnUsingCache | public Boolean isOwnUsingCache()(Code) | | Indicates if the engine is loading the current image from cache.
Implementations of this method return the actual value for the internal flag that was explicitly
set on this image element.
Boolean.TRUE if the image should be loaded from cache, Boolean.FALSE otherwise or null in case the flag was never explicitly set on this image element |
isUsingCache | public boolean isUsingCache()(Code) | | Indicates if the engine is loading the current image from cache.
Implementations of this method rely on default values that depend on the type of the image expression
if a value was not explicitly set of this flag.
true if the image should be loaded from cache, false otherwise |
setLazy | public void setLazy(boolean isLazy)(Code) | | Gives control over when the images are retrieved from their specified location. If set to true, the image is
loaded from the specified location only when the document is viewed or exported to other formats. Otherwise
it is loaded during the report filling process and stored in the resulting document.
Parameters: isLazy - specifies whether |
setOnErrorType | public void setOnErrorType(byte onErrorType)(Code) | | Specifies how the engine should treat a missing image.
Parameters: onErrorType - one of the constants for missing image error types |
setScaleImage | public void setScaleImage(byte scaleImage)(Code) | | Sets the image scale type.
Parameters: scaleImage - one of the scale constants in this class |
setScaleImage | public void setScaleImage(Byte scaleImage)(Code) | | |
setUsingCache | public void setUsingCache(boolean isUsingCache)(Code) | | Specifies if the engine should be loading the current image from cache. If set to true, the reporting engine
will try to recognize previously loaded images using their specified source. For example, it will recognize
an image if the image source is a file name that it has already loaded, or if it is the same URL.
For image elements that have expressions returning java.lang.String objects as the image source,
representing file names, URLs or classpath resources, the default value for this flag is true.
|
setUsingCache | public void setUsingCache(Boolean isUsingCache)(Code) | | Specifies if the engine should be loading the current image from cache. If set to Boolean.TRUE, the reporting engine
will try to recognize previously loaded images using their specified source. For example, it will recognize
an image if the image source is a file name that it has already loaded, or if it is the same URL.
If set to null, the engine will rely on some default value which depends on the type of the image expression.
The cache is turned on by default only for images that have java.lang.String objects in their expressions.
|
|
|