net.sf.jasperreports.engine
Interface JRImage

All Superinterfaces:
java.lang.Cloneable, JRAlignment, JRAnchor, JRBox, JRBoxContainer, JRChild, JRCloneable, JRCommonElement, JRCommonGraphicElement, JRCommonImage, JRElement, JRGraphicElement, JRHyperlink, JRPenContainer, JRPropertiesHolder, JRStyleContainer, JRVisitable
All Known Implementing Classes:
JRBaseImage, JRDesignImage, JRFillImage

public interface JRImage
extends JRGraphicElement, JRAnchor, JRHyperlink, JRAlignment, JRBox, JRCommonImage

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.

Version:
$Id: JRImage.java 3583 2010-03-12 11:35:40Z shertage $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
static byte ON_ERROR_TYPE_BLANK
          Deprecated. Replaced by OnErrorTypeEnum.BLANK.
static byte ON_ERROR_TYPE_ERROR
          Deprecated. Replaced by OnErrorTypeEnum.ERROR.
static byte ON_ERROR_TYPE_ICON
          Deprecated. Replaced by OnErrorTypeEnum.ICON.
static byte SCALE_IMAGE_CLIP
          Deprecated. Replaced by ScaleImageEnum.CLIP.
static byte SCALE_IMAGE_FILL_FRAME
          Deprecated. Replaced by ScaleImageEnum.FILL_FRAME.
static byte SCALE_IMAGE_REAL_HEIGHT
          Deprecated. Replaced by ScaleImageEnum.REAL_HEIGHT.
static byte SCALE_IMAGE_REAL_SIZE
          Deprecated. Replaced by ScaleImageEnum.REAL_SIZE.
static byte SCALE_IMAGE_RETAIN_SHAPE
          Deprecated. Replaced by ScaleImageEnum.RETAIN_SHAPE.
 
Fields inherited from interface net.sf.jasperreports.engine.JRGraphicElement
FILL_SOLID, PEN_1_POINT, PEN_2_POINT, PEN_4_POINT, PEN_DOTTED, PEN_NONE, PEN_THIN
 
Fields inherited from interface net.sf.jasperreports.engine.JRElement
MODE_OPAQUE, MODE_TRANSPARENT, POSITION_TYPE_FIX_RELATIVE_TO_BOTTOM, POSITION_TYPE_FIX_RELATIVE_TO_TOP, POSITION_TYPE_FLOAT, STRETCH_TYPE_NO_STRETCH, STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT, STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT
 
Fields inherited from interface net.sf.jasperreports.engine.JRAnchor
NO_BOOKMARK
 
Fields inherited from interface net.sf.jasperreports.engine.JRHyperlink
HYPERLINK_TARGET_BLANK, HYPERLINK_TARGET_CUSTOM, HYPERLINK_TARGET_PARENT, HYPERLINK_TARGET_SELF, HYPERLINK_TARGET_TOP, HYPERLINK_TYPE_CUSTOM, HYPERLINK_TYPE_LOCAL_ANCHOR, HYPERLINK_TYPE_LOCAL_PAGE, HYPERLINK_TYPE_NONE, HYPERLINK_TYPE_NULL, HYPERLINK_TYPE_REFERENCE, HYPERLINK_TYPE_REMOTE_ANCHOR, HYPERLINK_TYPE_REMOTE_PAGE
 
Fields inherited from interface net.sf.jasperreports.engine.JRAlignment
HORIZONTAL_ALIGN_CENTER, HORIZONTAL_ALIGN_JUSTIFIED, HORIZONTAL_ALIGN_LEFT, HORIZONTAL_ALIGN_RIGHT, VERTICAL_ALIGN_BOTTOM, VERTICAL_ALIGN_JUSTIFIED, VERTICAL_ALIGN_MIDDLE, VERTICAL_ALIGN_TOP
 
Method Summary
 JRBox getBox()
          Deprecated. Replaced by JRBoxContainer.getLineBox()
 JRGroup getEvaluationGroup()
          Gets the evaluation group for this text field.
 byte getEvaluationTime()
          Deprecated. Replaced by getEvaluationTimeValue().
 EvaluationTimeEnum getEvaluationTimeValue()
          Indicates the evaluation time for this image.
 JRExpression getExpression()
           
 byte getOnErrorType()
          Deprecated. Replaced by getOnErrorTypeValue().
 OnErrorTypeEnum getOnErrorTypeValue()
          Indicates how the engine will treat a missing image.
 boolean isLazy()
          Indicates if the images will be loaded lazily or not.
 java.lang.Boolean isOwnUsingCache()
          Indicates if the engine is loading the current image from cache.
 boolean isUsingCache()
          Indicates if the engine is loading the current image from cache.
 void setLazy(boolean isLazy)
          Gives control over when the images are retrieved from their specified location.
 void setOnErrorType(byte onErrorType)
          Deprecated. Replaced by setOnErrorType(OnErrorTypeEnum).
 void setOnErrorType(OnErrorTypeEnum onErrorTypeEnum)
          Specifies how the engine should treat a missing image.
 void setUsingCache(boolean isUsingCache)
          Specifies if the engine should be loading the current image from cache.
 void setUsingCache(java.lang.Boolean isUsingCache)
          Specifies if the engine should be loading the current image from cache.
 
Methods inherited from interface net.sf.jasperreports.engine.JRGraphicElement
getOwnPen, getPen, setPen, setPen
 
Methods inherited from interface net.sf.jasperreports.engine.JRElement
collectExpressions, getElementGroup, getKey, getPositionType, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchType, getStretchTypeValue, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setStretchType, setWidth, setX
 
Methods inherited from interface net.sf.jasperreports.engine.JRChild
clone
 
Methods inherited from interface net.sf.jasperreports.engine.JRVisitable
visit
 
Methods inherited from interface net.sf.jasperreports.engine.JRCloneable
clone
 
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
 
Methods inherited from interface net.sf.jasperreports.engine.JRAnchor
getAnchorNameExpression, getBookmarkLevel
 
Methods inherited from interface net.sf.jasperreports.engine.JRHyperlink
getHyperlinkAnchorExpression, getHyperlinkPageExpression, getHyperlinkParameters, getHyperlinkReferenceExpression, getHyperlinkTarget, getHyperlinkTooltipExpression, getHyperlinkType, getHyperlinkTypeValue, getLinkTarget, getLinkType
 
Methods inherited from interface net.sf.jasperreports.engine.JRAlignment
getHorizontalAlignment, getHorizontalAlignmentValue, getOwnHorizontalAlignment, getOwnHorizontalAlignmentValue, getOwnVerticalAlignment, getOwnVerticalAlignmentValue, getVerticalAlignment, getVerticalAlignmentValue, setHorizontalAlignment, setHorizontalAlignment, setHorizontalAlignment, setVerticalAlignment, setVerticalAlignment, setVerticalAlignment
 
Methods inherited from interface net.sf.jasperreports.engine.JRBox
getBorder, getBorderColor, getBottomBorder, getBottomBorderColor, getBottomPadding, getLeftBorder, getLeftBorderColor, getLeftPadding, getOwnBorder, getOwnBorderColor, getOwnBottomBorder, getOwnBottomBorderColor, getOwnBottomPadding, getOwnLeftBorder, getOwnLeftBorderColor, getOwnLeftPadding, getOwnPadding, getOwnRightBorder, getOwnRightBorderColor, getOwnRightPadding, getOwnTopBorder, getOwnTopBorderColor, getOwnTopPadding, getPadding, getRightBorder, getRightBorderColor, getRightPadding, getTopBorder, getTopBorderColor, getTopPadding, setBorder, setBorder, setBorderColor, setBottomBorder, setBottomBorder, setBottomBorderColor, setBottomPadding, setBottomPadding, setLeftBorder, setLeftBorder, setLeftBorderColor, setLeftPadding, setLeftPadding, setPadding, setPadding, setRightBorder, setRightBorder, setRightBorderColor, setRightPadding, setRightPadding, setTopBorder, setTopBorder, setTopBorderColor, setTopPadding, setTopPadding
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonImage
getOwnScaleImage, getOwnScaleImageValue, getScaleImage, getScaleImageValue, setScaleImage, setScaleImage, setScaleImage
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonGraphicElement
getFill, getFillValue, getLinePen, getOwnFill, getOwnFillValue, setFill, setFill, setFill
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getMode, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnMode, getOwnModeValue, getWidth, setBackcolor, setForecolor, setMode, setMode, setMode
 
Methods inherited from interface net.sf.jasperreports.engine.JRPenContainer
getDefaultLineColor, getDefaultLineWidth
 
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
 
Methods inherited from interface net.sf.jasperreports.engine.JRBoxContainer
getDefaultLineColor, getLineBox
 

Field Detail

SCALE_IMAGE_CLIP

static final byte SCALE_IMAGE_CLIP
Deprecated. Replaced by ScaleImageEnum.CLIP.
See Also:
Constant Field Values

SCALE_IMAGE_FILL_FRAME

static final byte SCALE_IMAGE_FILL_FRAME
Deprecated. Replaced by ScaleImageEnum.FILL_FRAME.
See Also:
Constant Field Values

SCALE_IMAGE_RETAIN_SHAPE

static final byte SCALE_IMAGE_RETAIN_SHAPE
Deprecated. Replaced by ScaleImageEnum.RETAIN_SHAPE.
See Also:
Constant Field Values

SCALE_IMAGE_REAL_HEIGHT

static final byte SCALE_IMAGE_REAL_HEIGHT
Deprecated. Replaced by ScaleImageEnum.REAL_HEIGHT.
See Also:
Constant Field Values

SCALE_IMAGE_REAL_SIZE

static final byte SCALE_IMAGE_REAL_SIZE
Deprecated. Replaced by ScaleImageEnum.REAL_SIZE.
See Also:
Constant Field Values

ON_ERROR_TYPE_ERROR

static final byte ON_ERROR_TYPE_ERROR
Deprecated. Replaced by OnErrorTypeEnum.ERROR.
See Also:
Constant Field Values

ON_ERROR_TYPE_BLANK

static final byte ON_ERROR_TYPE_BLANK
Deprecated. Replaced by OnErrorTypeEnum.BLANK.
See Also:
Constant Field Values

ON_ERROR_TYPE_ICON

static final byte ON_ERROR_TYPE_ICON
Deprecated. Replaced by OnErrorTypeEnum.ICON.
See Also:
Constant Field Values
Method Detail

isUsingCache

boolean isUsingCache()
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.

Returns:
true if the image should be loaded from cache, false otherwise

isOwnUsingCache

java.lang.Boolean isOwnUsingCache()
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.

Returns:
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

setUsingCache

void setUsingCache(boolean isUsingCache)
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

void setUsingCache(java.lang.Boolean isUsingCache)
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.


isLazy

boolean isLazy()
Indicates if the images will be loaded lazily or not.


setLazy

void setLazy(boolean isLazy)
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

getOnErrorType

byte getOnErrorType()
Deprecated. Replaced by getOnErrorTypeValue().


setOnErrorType

void setOnErrorType(byte onErrorType)
Deprecated. Replaced by setOnErrorType(OnErrorTypeEnum).


getOnErrorTypeValue

OnErrorTypeEnum getOnErrorTypeValue()
Indicates how the engine will treat a missing image.

Returns:
a value representing one of the missing image handling constants in OnErrorTypeEnum

setOnErrorType

void setOnErrorType(OnErrorTypeEnum onErrorTypeEnum)
Specifies how the engine should treat a missing image.

Parameters:
onErrorTypeEnum - a value representing one of the missing image handling constants in OnErrorTypeEnum

getEvaluationTime

byte getEvaluationTime()
Deprecated. Replaced by getEvaluationTimeValue().


getEvaluationTimeValue

EvaluationTimeEnum getEvaluationTimeValue()
Indicates the evaluation time for this image.

Returns:
one of the evaluation time constants in EvaluationTimeEnum

getEvaluationGroup

JRGroup getEvaluationGroup()
Gets the evaluation group for this text field. Used only when evaluation time is group.

See Also:
EvaluationTimeEnum.GROUP

getExpression

JRExpression getExpression()

getBox

JRBox getBox()
Deprecated. Replaced by JRBoxContainer.getLineBox()

Returns an object containing all border and padding properties for this text element



© 2001-2010 Jaspersoft Corporation www.jaspersoft.com