|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JRImage
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.
Field Summary | |
---|---|
static byte |
ON_ERROR_TYPE_BLANK
A constant used for specifying that the engine should display blank space if the image is not found. |
static byte |
ON_ERROR_TYPE_ERROR
A constant used for specifying that the engine should raise an exception if the image is not found. |
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. |
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. |
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. |
static byte |
SCALE_IMAGE_REAL_HEIGHT
A scale image type that instructs the engine to stretch the image height to fit the actual height of the image. |
static byte |
SCALE_IMAGE_REAL_SIZE
A scale image type that stretches the images height in the same way as SCALE_IMAGE_REAL_HEIGHT , and in addition it changes the image
width to the actual with of the image. |
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. |
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()
Indicates the evaluation time for this image. |
byte |
getEvaluationTime()
Indicates the evaluation time for this image. |
JRExpression |
getExpression()
Gets the evaluation group for this text field. |
byte |
getOnErrorType()
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)
Specifies how the engine should treat a missing image. |
void |
setScaleImage(byte scaleImage)
Sets the image scale type. |
void |
setScaleImage(java.lang.Byte scaleImage)
|
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, setFill, setFill, setPen, setPen |
Methods inherited from interface net.sf.jasperreports.engine.JRElement |
---|
collectExpressions, getElementGroup, getHeight, getKey, getPositionType, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchType, getWidth, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setBackcolor, setForecolor, setMode, setMode, 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, getLinkTarget, getLinkType |
Methods inherited from interface net.sf.jasperreports.engine.JRAlignment |
---|
getHorizontalAlignment, getOwnHorizontalAlignment, getOwnVerticalAlignment, getVerticalAlignment, setHorizontalAlignment, setHorizontalAlignment, setVerticalAlignment, setVerticalAlignment |
Methods inherited from interface net.sf.jasperreports.engine.JRCommonImage |
---|
getOwnScaleImage, getScaleImage |
Methods inherited from interface net.sf.jasperreports.engine.JRCommonGraphicElement |
---|
getFill, getLinePen, getOwnFill |
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement |
---|
getBackcolor, getForecolor, getMode, getOwnBackcolor, getOwnForecolor, getOwnMode |
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 |
---|
static final byte SCALE_IMAGE_CLIP
static final byte SCALE_IMAGE_FILL_FRAME
static final byte SCALE_IMAGE_RETAIN_SHAPE
static final byte SCALE_IMAGE_REAL_HEIGHT
Several restrictions apply to the image stretching mechanism:
JRRenderable.getDimension()
.getEvaluationTime()
)
do not stretch and is proportionally shrunk to fit the declared
height/width.
SCALE_IMAGE_REAL_SIZE
,
Constant Field Valuesstatic final byte SCALE_IMAGE_REAL_SIZE
SCALE_IMAGE_REAL_HEIGHT
, and in addition it changes the image
width to the actual with of the image.
This can be useful when, for instance, a border has to be drawn around
the image, respecting its actual size.
static final byte ON_ERROR_TYPE_ERROR
static final byte ON_ERROR_TYPE_BLANK
static final byte ON_ERROR_TYPE_ICON
Method Detail |
---|
void setScaleImage(byte scaleImage)
scaleImage
- one of the scale constants in this classvoid setScaleImage(java.lang.Byte scaleImage)
boolean isUsingCache()
java.lang.Boolean isOwnUsingCache()
void setUsingCache(boolean isUsingCache)
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.
void setUsingCache(java.lang.Boolean isUsingCache)
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.
boolean isLazy()
void setLazy(boolean isLazy)
isLazy
- specifies whetherbyte getOnErrorType()
void setOnErrorType(byte onErrorType)
onErrorType
- one of the constants for missing image error typesbyte getEvaluationTime()
JRExpression
JRGroup getEvaluationGroup()
JRExpression
JRExpression getExpression()
JRExpression.EVALUATION_TIME_GROUP
JRBox getBox()
JRBoxContainer.getLineBox()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |