public class JRTemplatePrintImage extends JRTemplatePrintGraphicElement implements JRPrintImage
JRPrintImage
that uses
a JRTemplateImage
instance to
store common attributes.Modifier and Type | Field and Description |
---|---|
protected int |
bookmarkLevel
The bookmark level for the anchor associated with this field.
|
EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND, template
UNSET_PRINT_ELEMENT_ID, UNSET_SOURCE_ELEMENT_ID
PROPERTY_IGNORE_HYPERLINK_SUFFIX
Constructor and Description |
---|
JRTemplatePrintImage() |
JRTemplatePrintImage(JRTemplateImage image,
PrintElementOriginator originator)
Creates a print image element.
|
Modifier and Type | Method and Description |
---|---|
<T> void |
accept(PrintElementVisitor<T> visitor,
T arg)
Accepts a print element visitor.
|
String |
getAnchorName() |
int |
getBookmarkLevel()
Returns the level of the bookmark corresponding to the anchor.
|
HorizontalImageAlignEnum |
getHorizontalImageAlign()
Gets the image horizontal alignment.
|
String |
getHyperlinkAnchor() |
Integer |
getHyperlinkPage() |
JRPrintHyperlinkParameters |
getHyperlinkParameters()
Returns the set of custom hyperlink parameters.
|
String |
getHyperlinkReference() |
HyperlinkTargetEnum |
getHyperlinkTargetValue() |
String |
getHyperlinkTooltip()
Returns the hyperlink tooltip.
|
HyperlinkTypeEnum |
getHyperlinkTypeValue()
Retrieves the hyperlink type for the element.
|
JRLineBox |
getLineBox() |
String |
getLinkTarget()
Returns the hyperlink target name.
|
String |
getLinkType()
Returns the hyperlink type.
|
OnErrorTypeEnum |
getOnErrorTypeValue() |
HorizontalImageAlignEnum |
getOwnHorizontalImageAlign() |
RotationEnum |
getOwnRotation()
Gets the image own rotation.
|
ScaleImageEnum |
getOwnScaleImageValue()
Gets the image own scale type.
|
VerticalImageAlignEnum |
getOwnVerticalImageAlign() |
Renderable |
getRenderable()
Deprecated.
Replaced by
getRenderer() . |
Renderable |
getRenderer() |
RotationEnum |
getRotation()
Gets the image rotation.
|
ScaleImageEnum |
getScaleImageValue()
Gets the image scale type.
|
VerticalImageAlignEnum |
getVerticalImageAlign()
Gets the image vertical alignment.
|
boolean |
isLazy()
Deprecated.
Replaced by
ResourceRenderer . |
boolean |
isUsingCache() |
void |
readVirtualized(VirtualizationInput in) |
void |
setAnchorName(String anchorName) |
void |
setBookmarkLevel(int bookmarkLevel)
Sets the boomark level for the anchor.
|
void |
setHorizontalImageAlign(HorizontalImageAlignEnum horizontalAlignment)
Sets the image horizontal alignment.
|
void |
setHyperlinkAnchor(String hyperlinkAnchor) |
void |
setHyperlinkOmitted(boolean hyperlinkOmitted) |
void |
setHyperlinkPage(Integer hyperlinkPage) |
void |
setHyperlinkParameters(JRPrintHyperlinkParameters parameters)
Sets the custom hyperlink parameters.
|
void |
setHyperlinkReference(String hyperlinkReference) |
void |
setHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget) |
void |
setHyperlinkTooltip(String hyperlinkTooltip)
Sets the tooltip to be used for the hyperlink.
|
void |
setHyperlinkType(HyperlinkTypeEnum hyperlinkType)
Sets the link type as a built-in hyperlink type.
|
void |
setLazy(boolean isLazy)
Deprecated.
Replaced by
ResourceRenderer . |
void |
setLinkTarget(String target)
Sets the hyperlink target name.
|
void |
setLinkType(String type)
Sets the hyperlink type.
|
void |
setOnErrorType(OnErrorTypeEnum onErrorType) |
void |
setRenderable(Renderable renderable)
Deprecated.
|
void |
setRenderer(Renderable renderable) |
void |
setRotation(RotationEnum rotation)
Sets the image rotation.
|
void |
setScaleImage(ScaleImageEnum scaleImage)
Sets the image scale type.
|
void |
setUsingCache(boolean isUsingCache) |
void |
setVerticalImageAlign(VerticalImageAlignEnum verticalAlignment)
Gets the image vertical alignment.
|
void |
writeVirtualized(VirtualizationOutput out) |
getDefaultLineColor, getDefaultLineWidth, getFillValue, getLinePen, getOwnFillValue, setFill
getBackcolor, getDefaultStyleProvider, getForecolor, getHeight, getKey, getModeValue, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPrintElementId, getPropertiesMap, getSourceElementId, getStyle, getStyleNameReference, getTemplate, getUUID, getWidth, getX, getY, hasProperties, setBackcolor, setForecolor, setHeight, setMode, setSourceElementId, setStyle, setTemplate, setUUID, setWidth, setX, setY, updateElementTemplate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setFill
getHeight, getKey, getOrigin, getPrintElementId, getSourceElementId, getWidth, getX, getY, setHeight, setStyle, setUUID, setWidth, setX, setY
getParentProperties, getPropertiesMap, hasProperties
getUUID
getFillValue, getLinePen, getOwnFillValue
getBackcolor, getForecolor, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, setBackcolor, setForecolor, setMode
getDefaultLineColor, getDefaultLineWidth
getDefaultStyleProvider, getStyle, getStyleNameReference
getDefaultLineColor
protected int bookmarkLevel
JRAnchor.getBookmarkLevel()
public JRTemplatePrintImage()
public JRTemplatePrintImage(JRTemplateImage image, PrintElementOriginator originator)
image
- the template image that the element will useoriginator
- public Renderable getRenderable()
getRenderer()
.getRenderable
in interface JRPrintImage
public void setRenderable(Renderable renderable)
setRenderer(net.sf.jasperreports.renderers.Renderable)
.setRenderable
in interface JRPrintImage
public Renderable getRenderer()
getRenderer
in interface JRPrintImage
public void setRenderer(Renderable renderable)
setRenderer
in interface JRPrintImage
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 RotationEnum getRotation()
JRCommonImage
getRotation
in interface JRCommonImage
RotationEnum
public RotationEnum getOwnRotation()
JRCommonImage
getOwnRotation
in interface JRCommonImage
RotationEnum
public void setRotation(RotationEnum rotation)
JRCommonImage
setRotation
in interface JRCommonImage
rotation
- a value representing one of the image rotation constants in RotationEnum
public boolean isUsingCache()
isUsingCache
in interface JRPrintImage
public void setUsingCache(boolean isUsingCache)
setUsingCache
in interface JRPrintImage
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 isLazy()
ResourceRenderer
.isLazy
in interface JRPrintImage
public void setLazy(boolean isLazy)
ResourceRenderer
.setLazy
in interface JRPrintImage
public OnErrorTypeEnum getOnErrorTypeValue()
getOnErrorTypeValue
in interface JRPrintImage
public void setOnErrorType(OnErrorTypeEnum onErrorType)
setOnErrorType
in interface JRPrintImage
public JRLineBox getLineBox()
getLineBox
in interface JRBoxContainer
public String getAnchorName()
getAnchorName
in interface JRPrintAnchor
public void setAnchorName(String anchorName)
setAnchorName
in interface JRPrintAnchor
public void setHyperlinkOmitted(boolean hyperlinkOmitted)
public HyperlinkTypeEnum getHyperlinkTypeValue()
JRPrintHyperlink
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 JRPrintHyperlink
JRPrintHyperlink.getLinkType()
public void setHyperlinkType(HyperlinkTypeEnum hyperlinkType)
JRPrintHyperlink
setHyperlinkType
in interface JRPrintHyperlink
hyperlinkType
- the built-in hyperlink typeJRPrintHyperlink.getLinkType()
public HyperlinkTargetEnum getHyperlinkTargetValue()
getHyperlinkTargetValue
in interface JRPrintHyperlink
public void setHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget)
setHyperlinkTarget
in interface JRPrintHyperlink
public String getHyperlinkReference()
getHyperlinkReference
in interface JRPrintHyperlink
public void setHyperlinkReference(String hyperlinkReference)
setHyperlinkReference
in interface JRPrintHyperlink
public String getHyperlinkAnchor()
getHyperlinkAnchor
in interface JRPrintHyperlink
public void setHyperlinkAnchor(String hyperlinkAnchor)
setHyperlinkAnchor
in interface JRPrintHyperlink
public Integer getHyperlinkPage()
getHyperlinkPage
in interface JRPrintHyperlink
public void setHyperlinkPage(Integer hyperlinkPage)
setHyperlinkPage
in interface JRPrintHyperlink
public int getBookmarkLevel()
JRPrintAnchor
getBookmarkLevel
in interface JRPrintAnchor
NO_BOOKMARK
if no bookmark should be created for this anchorpublic void setBookmarkLevel(int bookmarkLevel)
JRPrintAnchor
setBookmarkLevel
in interface JRPrintAnchor
bookmarkLevel
- the bookmark level (starting from 1)
or NO_BOOKMARK
if no bookmark should be createdpublic JRPrintHyperlinkParameters getHyperlinkParameters()
JRPrintHyperlink
getHyperlinkParameters
in interface JRPrintHyperlink
JRPrintHyperlink.setHyperlinkParameters(JRPrintHyperlinkParameters)
,
JRPrintHyperlinkParameter
public void setHyperlinkParameters(JRPrintHyperlinkParameters parameters)
JRPrintHyperlink
These parameters will be used to produce the actual hyperlink when the report is exported.
setHyperlinkParameters
in interface JRPrintHyperlink
parameters
- the set of custom hyperlink parameterspublic String getLinkType()
JRPrintHyperlink
getLinkType
in interface JRPrintHyperlink
public void setLinkType(String type)
JRPrintHyperlink
The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.
setLinkType
in interface JRPrintHyperlink
type
- the hyperlink typepublic String getLinkTarget()
JRPrintHyperlink
The target name can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.
getLinkTarget
in interface JRPrintHyperlink
public void setLinkTarget(String target)
JRPrintHyperlink
The target name can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.
setLinkTarget
in interface JRPrintHyperlink
target
- the hyperlink target namepublic String getHyperlinkTooltip()
JRPrintHyperlink
getHyperlinkTooltip
in interface JRPrintHyperlink
public void setHyperlinkTooltip(String hyperlinkTooltip)
JRPrintHyperlink
setHyperlinkTooltip
in interface JRPrintHyperlink
hyperlinkTooltip
- the tooltippublic <T> void accept(PrintElementVisitor<T> visitor, T arg)
JRPrintElement
The element calls the method that corresponds to the element type on the visitor.
accept
in interface JRPrintElement
accept
in class JRTemplatePrintElement
T
- the type of the argument passed to the visit operationvisitor
- the visitor objectsarg
- the argument passed to the visit operationpublic void writeVirtualized(VirtualizationOutput out) throws IOException
writeVirtualized
in interface VirtualizationSerializable
writeVirtualized
in class JRTemplatePrintElement
IOException
public void readVirtualized(VirtualizationInput in) throws IOException
readVirtualized
in interface VirtualizationSerializable
readVirtualized
in class JRTemplatePrintElement
IOException
Copyright © 2023 Cloud Software Group, Inc.. All rights reserved.