net.sf.jasperreports.engine
Interface JRImage

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

public interface JRImage
extends JRGraphicElement, JRAnchor, JRHyperlink, JRAlignment, 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 5180 2012-03-29 13:23:12Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
 
Fields inherited from interface net.sf.jasperreports.engine.JRAnchor
NO_BOOKMARK
 
Method Summary
 JRGroup getEvaluationGroup()
          Gets the evaluation group for this text field.
 EvaluationTimeEnum getEvaluationTimeValue()
          Indicates the evaluation time for this image.
 JRExpression getExpression()
           
 OnErrorTypeEnum getOnErrorTypeValue()
          Indicates how the engine will treat a missing image.
 java.lang.Boolean getUsingCache()
          Indicates if the engine is loading the current image from cache.
 boolean isLazy()
          Indicates if the images will be loaded lazily or not.
 java.lang.Boolean isOwnUsingCache()
          Deprecated. Replaced by getUsingCache().
 boolean isUsingCache()
          Deprecated. Replaced by getUsingCache().
 void setLazy(boolean isLazy)
          Gives control over when the images are retrieved from their specified location.
 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.JRElement
collectExpressions, getElementGroup, getKey, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchTypeValue, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, 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
getHorizontalAlignmentValue, getOwnHorizontalAlignmentValue, getOwnVerticalAlignmentValue, getVerticalAlignmentValue, setHorizontalAlignment, setVerticalAlignment
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonImage
getOwnScaleImageValue, getScaleImageValue, setScaleImage
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonGraphicElement
getFillValue, getLinePen, getOwnFillValue, setFill
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, setBackcolor, setForecolor, setMode
 
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
 
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
 

Method Detail

isUsingCache

boolean isUsingCache()
Deprecated. Replaced by getUsingCache().

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()
Deprecated. Replaced by getUsingCache().


getUsingCache

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

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

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()


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com