public class JRFillImage extends JRFillGraphicElement implements JRImage
Modifier and Type | Field and Description |
---|---|
static String |
EXCEPTION_MESSAGE_KEY_UNKNOWN_SOURCE_CLASS |
protected JRLineBox |
initLineBox |
protected JRLineBox |
lineBox |
initPen, pen
band, conditionalStylesContainer, currentEvaluation, currentStyle, defaultStyleProvider, delayedEvaluationsMap, dynamicProperties, dynamicTransferProperties, elementGroup, expressionEvaluator, fillContainerContext, filler, initStyle, mergedProperties, originProvider, parent, printElementOriginator, printWhenGroupChanges, propertyExpressions, providerStyle, staticProperties, styleProviders, templates
NO_BOOKMARK
Modifier | Constructor and Description |
---|---|
protected |
JRFillImage(JRBaseFiller filler,
JRImage image,
JRFillObjectFactory factory) |
protected |
JRFillImage(JRFillImage image,
JRFillCloneFactory factory) |
Modifier and Type | Method and Description |
---|---|
protected void |
collectDelayedEvaluations() |
void |
collectExpressions(JRExpressionCollector collector) |
protected void |
copy(JRPrintImage printImage) |
JRFillCloneable |
createClone(JRFillCloneFactory factory)
Creates a working clone of itself.
|
protected JRTemplateElement |
createElementTemplate() |
protected void |
evaluate(byte evaluation) |
protected void |
evaluateImage(byte evaluation) |
protected void |
evaluateStyle(byte evaluation) |
protected JRPrintElement |
fill() |
protected boolean |
fitImage(Dimension2D imageSize,
int availableHeight,
boolean overflowAllowed,
HorizontalImageAlignEnum hAlign) |
protected String |
getAnchorName() |
JRExpression |
getAnchorNameExpression()
Returns an expression whose value represents the anchor name.
|
int |
getBookmarkLevel()
Returns the level of the bookmark corresponding to the anchor.
|
JRGroup |
getEvaluationGroup()
Gets the evaluation group for this text field.
|
EvaluationTimeEnum |
getEvaluationTimeValue()
Gets the evaluation time for this text field.
|
JRExpression |
getExpression() |
HorizontalAlignEnum |
getHorizontalAlignmentValue()
Deprecated.
Replaced by
getHorizontalImageAlign() . |
HorizontalImageAlignEnum |
getHorizontalImageAlign()
Gets the image horizontal alignment.
|
protected String |
getHyperlinkAnchor() |
JRExpression |
getHyperlinkAnchorExpression()
Returns the expression whose value represents the anchor.
|
protected Integer |
getHyperlinkPage() |
JRExpression |
getHyperlinkPageExpression()
Returns an integer representing the page index of the link.
|
JRHyperlinkParameter[] |
getHyperlinkParameters()
Returns the list of hyperlink parameters.
|
protected String |
getHyperlinkReference() |
JRExpression |
getHyperlinkReferenceExpression()
Returns the expression whose value represents the hyperlink reference.
|
byte |
getHyperlinkTarget()
Retrieves the hyperlink target for the element.
|
protected String |
getHyperlinkTooltip() |
JRExpression |
getHyperlinkTooltipExpression()
Returns the expression which will generate the hyperlink tooltip.
|
byte |
getHyperlinkType()
Deprecated.
Replaced by
getHyperlinkTypeValue() . |
HyperlinkTypeEnum |
getHyperlinkTypeValue()
Retrieves the hyperlink type for the element.
|
JRExpression |
getHyperlinkWhenExpression()
Returns the expression that is evaluated in order to decide if the hyperlink should be displayed.
|
protected JRTemplateImage |
getJRTemplateImage() |
JRLineBox |
getLineBox() |
String |
getLinkTarget()
Returns the hyperlink target name.
|
String |
getLinkType()
Returns the hyperlink type.
|
ModeEnum |
getModeValue()
Returns the element transparency mode.
|
OnErrorTypeEnum |
getOnErrorTypeValue()
Indicates how the engine will treat a missing image.
|
HorizontalAlignEnum |
getOwnHorizontalAlignmentValue()
Deprecated.
Replaced by
getOwnHorizontalImageAlign() . |
HorizontalImageAlignEnum |
getOwnHorizontalImageAlign() |
ScaleImageEnum |
getOwnScaleImageValue()
Gets the image own scale type.
|
VerticalAlignEnum |
getOwnVerticalAlignmentValue()
Deprecated.
Replaced by
getOwnVerticalImageAlign() . |
VerticalImageAlignEnum |
getOwnVerticalImageAlign() |
protected Renderable |
getRenderable() |
ScaleImageEnum |
getScaleImageValue()
Gets the image scale type.
|
Boolean |
getUsingCache()
Indicates if the engine is loading the current image from cache.
|
VerticalAlignEnum |
getVerticalAlignmentValue()
Deprecated.
Replaced by
getVerticalImageAlign() . |
VerticalImageAlignEnum |
getVerticalImageAlign()
Gets the image vertical alignment.
|
boolean |
isLazy()
Indicates if the images will be loaded lazily or not.
|
Boolean |
isOwnUsingCache()
Deprecated.
Replaced by
getUsingCache() . |
boolean |
isUsingCache()
Deprecated.
Replaced by
getUsingCache() . |
protected boolean |
prepare(int availableHeight,
boolean isOverflow) |
protected void |
reset() |
protected void |
resolveElement(JRPrintElement element,
byte evaluation)
Resolves an element.
|
void |
setHorizontalAlignment(HorizontalAlignEnum horizontalAlignmentValue)
Deprecated.
Replaced by
setHorizontalImageAlign(HorizontalImageAlignEnum) . |
void |
setHorizontalImageAlign(HorizontalImageAlignEnum horizontalAlignment)
Sets the image horizontal alignment.
|
void |
setLazy(boolean isLazy)
Gives control over when the images are retrieved from their specified location.
|
void |
setOnErrorType(OnErrorTypeEnum onErrorType)
Specifies how the engine should treat a missing image.
|
void |
setScaleImage(ScaleImageEnum scaleImage)
Sets the image scale type.
|
void |
setUsingCache(boolean isUsingCache)
Specifies if the engine should be loading the current image from cache.
|
void |
setUsingCache(Boolean isUsingCache)
Specifies if the engine should be loading the current image from cache.
|
void |
setVerticalAlignment(VerticalAlignEnum verticalAlignmentValue)
Deprecated.
Replaced by
setVerticalImageAlign(VerticalImageAlignEnum) . |
void |
setVerticalImageAlign(VerticalImageAlignEnum verticalAlignment)
Gets the image vertical alignment.
|
void |
visit(JRVisitor visitor) |
getDefaultLineColor, getDefaultLineWidth, getFillValue, getLinePen, getOwnFillValue, rewind, setFill
_moveDependantElements, _stretchElement, _stretchElementToHeight, addDependantElement, addDynamicProperty, clone, clone, clone, collectDelayedEvaluations, collectDelayedEvaluations, collectStyleDelayedEvaluations, collectStyleProviderDelayedEvaluations, delayedEvaluate, delayedEvaluationUpdatesTemplate, evaluateExpression, evaluatePrintWhenExpression, evaluateProperties, getBackcolor, getBand, getCollapsedHeightAbove, getCollapsedHeightBelow, getConditionalStylesContainer, getDefaultStyleProvider, getDependantElements, getDynamicProperties, getElementGroup, getElementOrigin, getElementTemplate, getEvaluatedProperties, getField, getFiller, getForecolor, getGroupElements, getHeight, getInitStyle, getKey, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParent, getParentProperties, getPositionTypeValue, getPrepareHeight, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertiesMap, getPropertyExpressions, getRelativeY, getStretchHeight, getStretchTypeValue, getStyle, getStyleNameReference, getStyleResolver, getTemplate, getUUID, getVariable, getWidth, getX, getY, hasDynamicProperties, hasDynamicProperty, hasProperties, initDelayedEvaluationPrint, initDelayedEvaluations, initStyleProviders, isAlreadyPrinted, isAutoEvaluateNow, isDelayedStyleEvaluation, isEvaluateAuto, isEvaluateNow, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isPrintWhenExpressionNull, isPrintWhenTrue, isRemoveLineWhenBlank, isReprinted, isToPrint, isValueRepeating, moveDependantElements, performDelayedEvaluation, registerTemplate, resolveElement, setAlreadyPrinted, setBackcolor, setBand, setCollapsedHeightAbove, setCollapsedHeightBelow, setConditionalStylesContainer, setCurrentEvaluation, setExpressionEvaluator, setForecolor, setHeight, setMode, setOriginProvider, setPositionType, setPrepareHeight, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setPrintWhenExpressionNull, setPrintWhenTrue, setRelativeY, setRemoveLineWhenBlank, setReprinted, setShrinkable, setStretchHeight, setStretchType, setStyle, setStyleNameReference, setToPrint, setValueRepeating, setWidth, setX, setY, stretchElement, stretchElementToContainer, stretchElementToElementGroup, stretchElementToHeight, stretchHeightFinal, transferProperties, transferProperties
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone, getElementGroup, getKey, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchTypeValue, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
clone
getParentProperties, getPropertiesMap, hasProperties
getUUID
getFillValue, getLinePen, getOwnFillValue, setFill
getBackcolor, getForecolor, getHeight, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, setBackcolor, setForecolor, setMode
getDefaultLineColor, getDefaultLineWidth
getDefaultStyleProvider, getStyle, getStyleNameReference
getDefaultLineColor
public static final String EXCEPTION_MESSAGE_KEY_UNKNOWN_SOURCE_CLASS
protected final JRLineBox initLineBox
protected JRLineBox lineBox
protected JRFillImage(JRBaseFiller filler, JRImage image, JRFillObjectFactory factory)
protected JRFillImage(JRFillImage image, JRFillCloneFactory factory)
protected void evaluateStyle(byte evaluation) throws JRException
evaluateStyle
in class JRFillGraphicElement
JRException
public ModeEnum getModeValue()
JRCommonElement
getModeValue
in interface JRCommonElement
getModeValue
in class JRFillElement
public ScaleImageEnum getScaleImageValue()
JRCommonImage
getScaleImageValue
in interface JRCommonImage
ScaleImageEnum
public ScaleImageEnum getOwnScaleImageValue()
JRCommonImage
getOwnScaleImageValue
in interface JRCommonImage
ScaleImageEnum
public void setScaleImage(ScaleImageEnum scaleImage)
JRCommonImage
setScaleImage
in interface JRCommonImage
scaleImage
- a value representing one of the scale type constants in ScaleImageEnum
public HorizontalAlignEnum getHorizontalAlignmentValue()
getHorizontalImageAlign()
.JRAlignment
getHorizontalAlignmentValue
in interface JRAlignment
HorizontalAlignEnum
public HorizontalAlignEnum getOwnHorizontalAlignmentValue()
getOwnHorizontalImageAlign()
.getOwnHorizontalAlignmentValue
in interface JRAlignment
public void setHorizontalAlignment(HorizontalAlignEnum horizontalAlignmentValue)
setHorizontalImageAlign(HorizontalImageAlignEnum)
.JRAlignment
setHorizontalAlignment
in interface JRAlignment
horizontalAlignmentValue
- a value representing one of the horizontal alignment constants in HorizontalAlignEnum
public VerticalAlignEnum getVerticalAlignmentValue()
getVerticalImageAlign()
.JRAlignment
getVerticalAlignmentValue
in interface JRAlignment
VerticalAlignEnum
public VerticalAlignEnum getOwnVerticalAlignmentValue()
getOwnVerticalImageAlign()
.getOwnVerticalAlignmentValue
in interface JRAlignment
public void setVerticalAlignment(VerticalAlignEnum verticalAlignmentValue)
setVerticalImageAlign(VerticalImageAlignEnum)
.JRAlignment
setVerticalAlignment
in interface JRAlignment
verticalAlignmentValue
- a value representing one of the vertical alignment constants in VerticalAlignEnum
public HorizontalImageAlignEnum getHorizontalImageAlign()
JRImageAlignment
getHorizontalImageAlign
in interface JRImageAlignment
HorizontalImageAlignEnum
public HorizontalImageAlignEnum getOwnHorizontalImageAlign()
getOwnHorizontalImageAlign
in interface JRImageAlignment
public void setHorizontalImageAlign(HorizontalImageAlignEnum horizontalAlignment)
JRImageAlignment
setHorizontalImageAlign
in interface JRImageAlignment
horizontalAlignment
- a value representing one of the horizontal image alignment constants in HorizontalImageAlignEnum
public VerticalImageAlignEnum getVerticalImageAlign()
JRImageAlignment
getVerticalImageAlign
in interface JRImageAlignment
VerticalImageAlignEnum
public VerticalImageAlignEnum getOwnVerticalImageAlign()
getOwnVerticalImageAlign
in interface JRImageAlignment
public void setVerticalImageAlign(VerticalImageAlignEnum verticalAlignment)
JRImageAlignment
setVerticalImageAlign
in interface JRImageAlignment
verticalAlignment
- a value representing one of the vertical image alignment constants in VerticalImageAlignEnum
public boolean isUsingCache()
getUsingCache()
.JRImage
isUsingCache
in interface JRImage
public Boolean isOwnUsingCache()
getUsingCache()
.isOwnUsingCache
in interface JRImage
public Boolean getUsingCache()
JRImage
getUsingCache
in interface JRImage
public void setUsingCache(boolean isUsingCache)
JRImage
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
in interface JRImage
public void setUsingCache(Boolean isUsingCache)
JRImage
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.
setUsingCache
in interface JRImage
public boolean isLazy()
JRImage
public void setLazy(boolean isLazy)
JRImage
public OnErrorTypeEnum getOnErrorTypeValue()
JRImage
getOnErrorTypeValue
in interface JRImage
OnErrorTypeEnum
public void setOnErrorType(OnErrorTypeEnum onErrorType)
JRImage
setOnErrorType
in interface JRImage
onErrorType
- a value representing one of the missing image handling constants in OnErrorTypeEnum
public EvaluationTimeEnum getEvaluationTimeValue()
JREvaluation
getEvaluationTimeValue
in interface JREvaluation
getEvaluationTimeValue
in class JRFillElement
JRExpression
public JRGroup getEvaluationGroup()
JREvaluation
getEvaluationGroup
in interface JREvaluation
EvaluationTimeEnum.GROUP
public JRLineBox getLineBox()
getLineBox
in interface JRBoxContainer
public byte getHyperlinkType()
getHyperlinkTypeValue()
.public HyperlinkTypeEnum getHyperlinkTypeValue()
JRHyperlink
The actual hyperlink type is determined by getLinkType()
.
This method can is used to determine whether the hyperlink type is one of the
built-in types or a custom type.
When hyperlink is of custom type, CUSTOM
is returned.
getHyperlinkTypeValue
in interface JRHyperlink
JRHyperlink.getLinkType()
public byte getHyperlinkTarget()
JRHyperlink
The actual hyperlink target is determined by getLinkTarget()
.
This method can is used to determine whether the hyperlink target is one of the
built-in target names or a custom one.
When hyperlink has a custom target name, HyperlinkTargetEnum.CUSTOM
is returned.
getHyperlinkTarget
in interface JRHyperlink
JRHyperlink.getLinkTarget()
public String getLinkTarget()
JRHyperlink
The type can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.
getLinkTarget
in interface JRHyperlink
public JRExpression getExpression()
getExpression
in interface JRImage
public JRExpression getAnchorNameExpression()
JRAnchor
getAnchorNameExpression
in interface JRAnchor
public JRExpression getHyperlinkReferenceExpression()
JRHyperlink
getHyperlinkReferenceExpression
in interface JRHyperlink
public JRExpression getHyperlinkWhenExpression()
JRHyperlink
getHyperlinkWhenExpression
in interface JRHyperlink
public JRExpression getHyperlinkAnchorExpression()
JRHyperlink
getHyperlinkAnchorExpression
in interface JRHyperlink
public JRExpression getHyperlinkPageExpression()
JRHyperlink
getHyperlinkPageExpression
in interface JRHyperlink
protected Renderable getRenderable()
protected String getAnchorName()
protected String getHyperlinkReference()
protected String getHyperlinkAnchor()
protected Integer getHyperlinkPage()
protected String getHyperlinkTooltip()
protected JRTemplateImage getJRTemplateImage()
protected JRTemplateElement createElementTemplate()
createElementTemplate
in class JRFillElement
protected void evaluate(byte evaluation) throws JRException
evaluate
in class JRFillElement
JRException
protected void evaluateImage(byte evaluation) throws JRException
JRException
protected boolean prepare(int availableHeight, boolean isOverflow) throws JRException
prepare
in class JRFillGraphicElement
JRException
protected void reset()
reset
in class JRFillElement
protected boolean fitImage(Dimension2D imageSize, int availableHeight, boolean overflowAllowed, HorizontalImageAlignEnum hAlign) throws JRException
JRException
protected JRPrintElement fill() throws JRException
fill
in class JRFillElement
JRException
protected void copy(JRPrintImage printImage)
public void collectExpressions(JRExpressionCollector collector)
collectExpressions
in interface JRElement
public void visit(JRVisitor visitor)
visit
in interface JRVisitable
protected void resolveElement(JRPrintElement element, byte evaluation) throws JRException
JRFillElement
resolveElement
in class JRFillElement
element
- the elementevaluation
- the evaluation typeJRException
public int getBookmarkLevel()
JRAnchor
getBookmarkLevel
in interface JRAnchor
NO_BOOKMARK
if no bookmark should be created for this anchorpublic JRFillCloneable createClone(JRFillCloneFactory factory)
JRFillCloneable
createClone
in interface JRFillCloneable
factory
- the clone factory to use while creating the cloneprotected void collectDelayedEvaluations()
collectDelayedEvaluations
in class JRFillElement
public JRHyperlinkParameter[] getHyperlinkParameters()
JRHyperlink
The parameters can be used by custom hyperlink types to generate dynamic links.
getHyperlinkParameters
in interface JRHyperlink
public String getLinkType()
JRHyperlink
The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.
getLinkType
in interface JRHyperlink
public JRExpression getHyperlinkTooltipExpression()
JRHyperlink
getHyperlinkTooltipExpression
in interface JRHyperlink
Copyright © 2017. All rights reserved.