Class JRTemplatePrintImage
- java.lang.Object
-
- net.sf.jasperreports.engine.fill.JRTemplatePrintElement
-
- net.sf.jasperreports.engine.fill.JRTemplatePrintGraphicElement
-
- net.sf.jasperreports.engine.fill.JRTemplatePrintImage
-
- All Implemented Interfaces:
java.io.Serializable,JRBoxContainer,JRCommonElement,JRCommonGraphicElement,JRCommonImage,JRIdentifiable,JRImageAlignment,JRPenContainer,JRPrintAnchor,JRPrintElement,JRPrintGraphicElement,JRPrintHyperlink,JRPrintImage,JRPropertiesHolder,JRStyleContainer,VirtualizationSerializable
- Direct Known Subclasses:
JRRecordedValuesPrintImage
public class JRTemplatePrintImage extends JRTemplatePrintGraphicElement implements JRPrintImage
Implementation ofJRPrintImagethat uses aJRTemplateImageinstance to store common attributes.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intbookmarkLevelThe bookmark level for the anchor associated with this field.-
Fields inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintElement
EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND, template
-
Fields inherited from interface net.sf.jasperreports.engine.JRPrintElement
UNSET_PRINT_ELEMENT_ID, UNSET_SOURCE_ELEMENT_ID
-
Fields inherited from interface net.sf.jasperreports.engine.JRPrintHyperlink
PROPERTY_IGNORE_HYPERLINK_SUFFIX
-
-
Constructor Summary
Constructors Constructor Description JRTemplatePrintImage()JRTemplatePrintImage(JRTemplateImage image, PrintElementOriginator originator)Creates a print image element.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T> voidaccept(PrintElementVisitor<T> visitor, T arg)Accepts a print element visitor.java.lang.StringgetAnchorName()intgetBookmarkLevel()Returns the level of the bookmark corresponding to the anchor.HorizontalImageAlignEnumgetHorizontalImageAlign()Gets the image horizontal alignment.java.lang.StringgetHyperlinkAnchor()java.lang.IntegergetHyperlinkPage()JRPrintHyperlinkParametersgetHyperlinkParameters()Returns the set of custom hyperlink parameters.java.lang.StringgetHyperlinkReference()HyperlinkTargetEnumgetHyperlinkTargetValue()java.lang.StringgetHyperlinkTooltip()Returns the hyperlink tooltip.HyperlinkTypeEnumgetHyperlinkTypeValue()Retrieves the hyperlink type for the element.JRLineBoxgetLineBox()java.lang.StringgetLinkTarget()Returns the hyperlink target name.java.lang.StringgetLinkType()Returns the hyperlink type.OnErrorTypeEnumgetOnErrorTypeValue()HorizontalImageAlignEnumgetOwnHorizontalImageAlign()RotationEnumgetOwnRotation()Gets the image own rotation.ScaleImageEnumgetOwnScaleImageValue()Gets the image own scale type.VerticalImageAlignEnumgetOwnVerticalImageAlign()RenderablegetRenderable()Deprecated.Replaced bygetRenderer().RenderablegetRenderer()RotationEnumgetRotation()Gets the image rotation.ScaleImageEnumgetScaleImageValue()Gets the image scale type.VerticalImageAlignEnumgetVerticalImageAlign()Gets the image vertical alignment.booleanisLazy()Deprecated.Replaced byResourceRenderer.booleanisUsingCache()voidreadVirtualized(VirtualizationInput in)voidsetAnchorName(java.lang.String anchorName)voidsetBookmarkLevel(int bookmarkLevel)Sets the boomark level for the anchor.voidsetHorizontalImageAlign(HorizontalImageAlignEnum horizontalAlignment)Sets the image horizontal alignment.voidsetHyperlinkAnchor(java.lang.String hyperlinkAnchor)voidsetHyperlinkOmitted(boolean hyperlinkOmitted)voidsetHyperlinkPage(java.lang.Integer hyperlinkPage)voidsetHyperlinkParameters(JRPrintHyperlinkParameters parameters)Sets the custom hyperlink parameters.voidsetHyperlinkReference(java.lang.String hyperlinkReference)voidsetHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget)voidsetHyperlinkTooltip(java.lang.String hyperlinkTooltip)Sets the tooltip to be used for the hyperlink.voidsetHyperlinkType(HyperlinkTypeEnum hyperlinkType)Sets the link type as a built-in hyperlink type.voidsetLazy(boolean isLazy)Deprecated.Replaced byResourceRenderer.voidsetLinkTarget(java.lang.String target)Sets the hyperlink target name.voidsetLinkType(java.lang.String type)Sets the hyperlink type.voidsetOnErrorType(OnErrorTypeEnum onErrorType)voidsetRenderable(Renderable renderable)Deprecated.voidsetRenderer(Renderable renderable)voidsetRotation(RotationEnum rotation)Sets the image rotation.voidsetScaleImage(ScaleImageEnum scaleImage)Sets the image scale type.voidsetUsingCache(boolean isUsingCache)voidsetVerticalImageAlign(VerticalImageAlignEnum verticalAlignment)Gets the image vertical alignment.voidwriteVirtualized(VirtualizationOutput out)-
Methods inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintGraphicElement
getDefaultLineColor, getDefaultLineWidth, getFillValue, getLinePen, getOwnFillValue, setFill
-
Methods inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintElement
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.jasperreports.engine.JRBoxContainer
getDefaultLineColor
-
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, setBackcolor, setForecolor, setMode
-
Methods inherited from interface net.sf.jasperreports.engine.JRCommonGraphicElement
getFillValue, getLinePen, getOwnFillValue
-
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.JRPrintElement
getHeight, getKey, getOrigin, getPrintElementId, getSourceElementId, getWidth, getX, getY, setHeight, setStyle, setUUID, setWidth, setX, setY
-
Methods inherited from interface net.sf.jasperreports.engine.JRPrintGraphicElement
setFill
-
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
-
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
-
-
-
-
Field Detail
-
bookmarkLevel
protected int bookmarkLevel
The bookmark level for the anchor associated with this field.- See Also:
JRAnchor.getBookmarkLevel()
-
-
Constructor Detail
-
JRTemplatePrintImage
public JRTemplatePrintImage()
-
JRTemplatePrintImage
public JRTemplatePrintImage(JRTemplateImage image, PrintElementOriginator originator)
Creates a print image element.- Parameters:
image- the template image that the element will useoriginator-
-
-
Method Detail
-
getRenderable
public Renderable getRenderable()
Deprecated.Replaced bygetRenderer().- Specified by:
getRenderablein interfaceJRPrintImage
-
setRenderable
public void setRenderable(Renderable renderable)
Deprecated.- Specified by:
setRenderablein interfaceJRPrintImage
-
getRenderer
public Renderable getRenderer()
- Specified by:
getRendererin interfaceJRPrintImage
-
setRenderer
public void setRenderer(Renderable renderable)
- Specified by:
setRendererin interfaceJRPrintImage
-
getScaleImageValue
public ScaleImageEnum getScaleImageValue()
Description copied from interface:JRCommonImageGets the image scale type.- Specified by:
getScaleImageValuein interfaceJRCommonImage- Returns:
- a value representing one of the scale type constants in
ScaleImageEnum
-
getOwnScaleImageValue
public ScaleImageEnum getOwnScaleImageValue()
Description copied from interface:JRCommonImageGets the image own scale type.- Specified by:
getOwnScaleImageValuein interfaceJRCommonImage- Returns:
- a value representing one of the scale type constants in
ScaleImageEnum
-
setScaleImage
public void setScaleImage(ScaleImageEnum scaleImage)
Description copied from interface:JRCommonImageSets the image scale type.- Specified by:
setScaleImagein interfaceJRCommonImage- Parameters:
scaleImage- a value representing one of the scale type constants inScaleImageEnum
-
getRotation
public RotationEnum getRotation()
Description copied from interface:JRCommonImageGets the image rotation.- Specified by:
getRotationin interfaceJRCommonImage- Returns:
- a value representing one of the image rotation constants in
RotationEnum
-
getOwnRotation
public RotationEnum getOwnRotation()
Description copied from interface:JRCommonImageGets the image own rotation.- Specified by:
getOwnRotationin interfaceJRCommonImage- Returns:
- a value representing one of the image rotation constants in
RotationEnum
-
setRotation
public void setRotation(RotationEnum rotation)
Description copied from interface:JRCommonImageSets the image rotation.- Specified by:
setRotationin interfaceJRCommonImage- Parameters:
rotation- a value representing one of the image rotation constants inRotationEnum
-
isUsingCache
public boolean isUsingCache()
- Specified by:
isUsingCachein interfaceJRPrintImage
-
setUsingCache
public void setUsingCache(boolean isUsingCache)
- Specified by:
setUsingCachein interfaceJRPrintImage
-
getHorizontalImageAlign
public HorizontalImageAlignEnum getHorizontalImageAlign()
Description copied from interface:JRImageAlignmentGets the image horizontal alignment.- Specified by:
getHorizontalImageAlignin interfaceJRImageAlignment- Returns:
- a value representing one of the horizontal image alignment constants in
HorizontalImageAlignEnum
-
getOwnHorizontalImageAlign
public HorizontalImageAlignEnum getOwnHorizontalImageAlign()
- Specified by:
getOwnHorizontalImageAlignin interfaceJRImageAlignment
-
setHorizontalImageAlign
public void setHorizontalImageAlign(HorizontalImageAlignEnum horizontalAlignment)
Description copied from interface:JRImageAlignmentSets the image horizontal alignment.- Specified by:
setHorizontalImageAlignin interfaceJRImageAlignment- Parameters:
horizontalAlignment- a value representing one of the horizontal image alignment constants inHorizontalImageAlignEnum
-
getVerticalImageAlign
public VerticalImageAlignEnum getVerticalImageAlign()
Description copied from interface:JRImageAlignmentGets the image vertical alignment.- Specified by:
getVerticalImageAlignin interfaceJRImageAlignment- Returns:
- a value representing one of the vertical image alignment constants in
VerticalImageAlignEnum
-
getOwnVerticalImageAlign
public VerticalImageAlignEnum getOwnVerticalImageAlign()
- Specified by:
getOwnVerticalImageAlignin interfaceJRImageAlignment
-
setVerticalImageAlign
public void setVerticalImageAlign(VerticalImageAlignEnum verticalAlignment)
Description copied from interface:JRImageAlignmentGets the image vertical alignment.- Specified by:
setVerticalImageAlignin interfaceJRImageAlignment- Parameters:
verticalAlignment- a value representing one of the vertical image alignment constants inVerticalImageAlignEnum
-
isLazy
public boolean isLazy()
Deprecated.Replaced byResourceRenderer.- Specified by:
isLazyin interfaceJRPrintImage
-
setLazy
public void setLazy(boolean isLazy)
Deprecated.Replaced byResourceRenderer.- Specified by:
setLazyin interfaceJRPrintImage
-
getOnErrorTypeValue
public OnErrorTypeEnum getOnErrorTypeValue()
- Specified by:
getOnErrorTypeValuein interfaceJRPrintImage
-
setOnErrorType
public void setOnErrorType(OnErrorTypeEnum onErrorType)
- Specified by:
setOnErrorTypein interfaceJRPrintImage
-
getLineBox
public JRLineBox getLineBox()
- Specified by:
getLineBoxin interfaceJRBoxContainer
-
getAnchorName
public java.lang.String getAnchorName()
- Specified by:
getAnchorNamein interfaceJRPrintAnchor
-
setAnchorName
public void setAnchorName(java.lang.String anchorName)
- Specified by:
setAnchorNamein interfaceJRPrintAnchor
-
setHyperlinkOmitted
public void setHyperlinkOmitted(boolean hyperlinkOmitted)
-
getHyperlinkTypeValue
public HyperlinkTypeEnum getHyperlinkTypeValue()
Description copied from interface:JRPrintHyperlinkRetrieves the hyperlink type for the element.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,CUSTOMis returned.- Specified by:
getHyperlinkTypeValuein interfaceJRPrintHyperlink- Returns:
- one of the hyperlink type constants
- See Also:
JRPrintHyperlink.getLinkType()
-
setHyperlinkType
public void setHyperlinkType(HyperlinkTypeEnum hyperlinkType)
Description copied from interface:JRPrintHyperlinkSets the link type as a built-in hyperlink type.- Specified by:
setHyperlinkTypein interfaceJRPrintHyperlink- Parameters:
hyperlinkType- the built-in hyperlink type- See Also:
JRPrintHyperlink.getLinkType()
-
getHyperlinkTargetValue
public HyperlinkTargetEnum getHyperlinkTargetValue()
- Specified by:
getHyperlinkTargetValuein interfaceJRPrintHyperlink
-
setHyperlinkTarget
public void setHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget)
- Specified by:
setHyperlinkTargetin interfaceJRPrintHyperlink
-
getHyperlinkReference
public java.lang.String getHyperlinkReference()
- Specified by:
getHyperlinkReferencein interfaceJRPrintHyperlink
-
setHyperlinkReference
public void setHyperlinkReference(java.lang.String hyperlinkReference)
- Specified by:
setHyperlinkReferencein interfaceJRPrintHyperlink
-
getHyperlinkAnchor
public java.lang.String getHyperlinkAnchor()
- Specified by:
getHyperlinkAnchorin interfaceJRPrintHyperlink
-
setHyperlinkAnchor
public void setHyperlinkAnchor(java.lang.String hyperlinkAnchor)
- Specified by:
setHyperlinkAnchorin interfaceJRPrintHyperlink
-
getHyperlinkPage
public java.lang.Integer getHyperlinkPage()
- Specified by:
getHyperlinkPagein interfaceJRPrintHyperlink
-
setHyperlinkPage
public void setHyperlinkPage(java.lang.Integer hyperlinkPage)
- Specified by:
setHyperlinkPagein interfaceJRPrintHyperlink
-
getBookmarkLevel
public int getBookmarkLevel()
Description copied from interface:JRPrintAnchorReturns the level of the bookmark corresponding to the anchor.- Specified by:
getBookmarkLevelin interfaceJRPrintAnchor- Returns:
- the level of the bookmark corresponding to the anchor (starting from 1)
or
NO_BOOKMARKif no bookmark should be created for this anchor
-
setBookmarkLevel
public void setBookmarkLevel(int bookmarkLevel)
Description copied from interface:JRPrintAnchorSets the boomark level for the anchor.- Specified by:
setBookmarkLevelin interfaceJRPrintAnchor- Parameters:
bookmarkLevel- the bookmark level (starting from 1) orNO_BOOKMARKif no bookmark should be created
-
getHyperlinkParameters
public JRPrintHyperlinkParameters getHyperlinkParameters()
Description copied from interface:JRPrintHyperlinkReturns the set of custom hyperlink parameters.- Specified by:
getHyperlinkParametersin interfaceJRPrintHyperlink- Returns:
- the set of custom hyperlink parameters
- See Also:
JRPrintHyperlink.setHyperlinkParameters(JRPrintHyperlinkParameters),JRPrintHyperlinkParameter
-
setHyperlinkParameters
public void setHyperlinkParameters(JRPrintHyperlinkParameters parameters)
Description copied from interface:JRPrintHyperlinkSets the custom hyperlink parameters.These parameters will be used to produce the actual hyperlink when the report is exported.
- Specified by:
setHyperlinkParametersin interfaceJRPrintHyperlink- Parameters:
parameters- the set of custom hyperlink parameters
-
getLinkType
public java.lang.String getLinkType()
Description copied from interface:JRPrintHyperlinkReturns the hyperlink type.- Specified by:
getLinkTypein interfaceJRPrintHyperlink- Returns:
- the hyperlink type
-
setLinkType
public void setLinkType(java.lang.String type)
Description copied from interface:JRPrintHyperlinkSets the hyperlink type.The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.
- Specified by:
setLinkTypein interfaceJRPrintHyperlink- Parameters:
type- the hyperlink type
-
getLinkTarget
public java.lang.String getLinkTarget()
Description copied from interface:JRPrintHyperlinkReturns the hyperlink target name.The target name can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.
- Specified by:
getLinkTargetin interfaceJRPrintHyperlink- Returns:
- the hyperlink type
-
setLinkTarget
public void setLinkTarget(java.lang.String target)
Description copied from interface:JRPrintHyperlinkSets the hyperlink target name.The target name can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.
- Specified by:
setLinkTargetin interfaceJRPrintHyperlink- Parameters:
target- the hyperlink target name
-
getHyperlinkTooltip
public java.lang.String getHyperlinkTooltip()
Description copied from interface:JRPrintHyperlinkReturns the hyperlink tooltip.- Specified by:
getHyperlinkTooltipin interfaceJRPrintHyperlink- Returns:
- the hyperlink tooltip
-
setHyperlinkTooltip
public void setHyperlinkTooltip(java.lang.String hyperlinkTooltip)
Description copied from interface:JRPrintHyperlinkSets the tooltip to be used for the hyperlink.- Specified by:
setHyperlinkTooltipin interfaceJRPrintHyperlink- Parameters:
hyperlinkTooltip- the tooltip
-
accept
public <T> void accept(PrintElementVisitor<T> visitor, T arg)
Description copied from interface:JRPrintElementAccepts a print element visitor.The element calls the method that corresponds to the element type on the visitor.
- Specified by:
acceptin interfaceJRPrintElement- Overrides:
acceptin classJRTemplatePrintElement- Type Parameters:
T- the type of the argument passed to the visit operation- Parameters:
visitor- the visitor objectsarg- the argument passed to the visit operation
-
writeVirtualized
public void writeVirtualized(VirtualizationOutput out) throws java.io.IOException
- Specified by:
writeVirtualizedin interfaceVirtualizationSerializable- Overrides:
writeVirtualizedin classJRTemplatePrintElement- Throws:
java.io.IOException
-
readVirtualized
public void readVirtualized(VirtualizationInput in) throws java.io.IOException
- Specified by:
readVirtualizedin interfaceVirtualizationSerializable- Overrides:
readVirtualizedin classJRTemplatePrintElement- Throws:
java.io.IOException
-
-