Class JRTemplatePrintImage
- All Implemented Interfaces:
Serializable,JRBoxContainer,JRCommonElement,JRCommonGraphicElement,JRCommonImage,JRIdentifiable,JRImageAlignment,JRPenContainer,JRPrintAnchor,JRPrintElement,JRPrintGraphicElement,JRPrintHyperlink,JRPrintImage,JRPropertiesHolder,JRStyleContainer,VirtualizationSerializable
- Direct Known Subclasses:
JRRecordedValuesPrintImage
JRPrintImage that uses
a JRTemplateImage instance to
store common attributes.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe 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, templateFields inherited from interface net.sf.jasperreports.engine.JRPrintElement
UNSET_PRINT_ELEMENT_ID, UNSET_SOURCE_ELEMENT_IDFields inherited from interface net.sf.jasperreports.engine.JRPrintHyperlink
PROPERTY_IGNORE_HYPERLINK_SUFFIX -
Constructor Summary
ConstructorsConstructorDescriptionJRTemplatePrintImage(JRTemplateImage image, PrintElementOriginator originator) Creates a print image element. -
Method Summary
Modifier and TypeMethodDescription<T> voidaccept(PrintElementVisitor<T> visitor, T arg) Accepts a print element visitor.intReturns the level of the bookmark corresponding to the anchor.Gets the image horizontal alignment.Returns the set of custom hyperlink parameters.Returns the hyperlink tooltip.Retrieves the hyperlink type for the element.Returns the hyperlink target name.Returns the hyperlink type.Gets the image own rotation.Gets the image own scale type.Gets the image rotation.Gets the image scale type.Gets the image vertical alignment.booleanvoidvoidsetAnchorName(String anchorName) voidsetBookmarkLevel(int bookmarkLevel) Sets the boomark level for the anchor.voidsetHorizontalImageAlign(HorizontalImageAlignEnum horizontalAlignment) Sets the image horizontal alignment.voidsetHyperlinkAnchor(String hyperlinkAnchor) voidsetHyperlinkOmitted(boolean hyperlinkOmitted) voidsetHyperlinkPage(Integer hyperlinkPage) voidsetHyperlinkParameters(JRPrintHyperlinkParameters parameters) Sets the custom hyperlink parameters.voidsetHyperlinkReference(String hyperlinkReference) voidsetHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget) voidsetHyperlinkTooltip(String hyperlinkTooltip) Sets the tooltip to be used for the hyperlink.voidsetHyperlinkType(HyperlinkTypeEnum hyperlinkType) Sets the link type as a built-in hyperlink type.voidsetLinkTarget(String target) Sets the hyperlink target name.voidsetLinkType(String type) Sets the hyperlink type.voidsetOnErrorType(OnErrorTypeEnum onErrorType) 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.voidMethods inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintGraphicElement
getDefaultLineColor, getDefaultLineWidth, getFill, getLinePen, getOwnFill, setFillMethods inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintElement
getBackcolor, getDefaultStyleProvider, getForecolor, getHeight, getKey, getMode, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnMode, getParentProperties, getPrintElementId, getPropertiesMap, getSourceElementId, getStyle, getStyleNameReference, getTemplate, getUUID, getWidth, getX, getY, hasProperties, setBackcolor, setForecolor, setHeight, setMode, setSourceElementId, setStyle, setTemplate, setUUID, setWidth, setX, setY, updateElementTemplateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.jasperreports.engine.JRBoxContainer
getDefaultLineColorMethods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getMode, getOwnBackcolor, getOwnForecolor, getOwnMode, setBackcolor, setForecolor, setModeMethods inherited from interface net.sf.jasperreports.engine.JRCommonGraphicElement
getFill, getLinePen, getOwnFillMethods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUIDMethods inherited from interface net.sf.jasperreports.engine.JRPenContainer
getDefaultLineColor, getDefaultLineWidthMethods inherited from interface net.sf.jasperreports.engine.JRPrintElement
getHeight, getKey, getOrigin, getPrintElementId, getSourceElementId, getWidth, getX, getY, setHeight, setStyle, setUUID, setWidth, setX, setYMethods inherited from interface net.sf.jasperreports.engine.JRPrintGraphicElement
setFillMethods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasPropertiesMethods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleName, getStyleNameReference
-
Field Details
-
bookmarkLevel
protected int bookmarkLevelThe bookmark level for the anchor associated with this field.- See Also:
-
-
Constructor Details
-
JRTemplatePrintImage
public JRTemplatePrintImage() -
JRTemplatePrintImage
Creates a print image element.- Parameters:
image- the template image that the element will useoriginator-
-
-
Method Details
-
getRenderer
- Specified by:
getRendererin interfaceJRPrintImage
-
setRenderer
- Specified by:
setRendererin interfaceJRPrintImage
-
getScaleImage
Description copied from interface:JRCommonImageGets the image scale type.- Specified by:
getScaleImagein interfaceJRCommonImage- Returns:
- a value representing one of the scale type constants in
ScaleImageEnum
-
getOwnScaleImage
Description copied from interface:JRCommonImageGets the image own scale type.- Specified by:
getOwnScaleImagein interfaceJRCommonImage- Returns:
- a value representing one of the scale type constants in
ScaleImageEnum
-
setScaleImage
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
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
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
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
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
- Specified by:
getOwnHorizontalImageAlignin interfaceJRImageAlignment
-
setHorizontalImageAlign
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
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
- Specified by:
getOwnVerticalImageAlignin interfaceJRImageAlignment
-
setVerticalImageAlign
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
-
getOnErrorType
- Specified by:
getOnErrorTypein interfaceJRPrintImage
-
setOnErrorType
- Specified by:
setOnErrorTypein interfaceJRPrintImage
-
getLineBox
- Specified by:
getLineBoxin interfaceJRBoxContainer
-
getAnchorName
- Specified by:
getAnchorNamein interfaceJRPrintAnchor
-
setAnchorName
- Specified by:
setAnchorNamein interfaceJRPrintAnchor
-
setHyperlinkOmitted
public void setHyperlinkOmitted(boolean hyperlinkOmitted) -
getHyperlinkType
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:
getHyperlinkTypein interfaceJRPrintHyperlink- Returns:
- one of the hyperlink type constants
- See Also:
-
setHyperlinkType
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:
-
getHyperlinkTarget
- Specified by:
getHyperlinkTargetin interfaceJRPrintHyperlink
-
setHyperlinkTarget
- Specified by:
setHyperlinkTargetin interfaceJRPrintHyperlink
-
getHyperlinkReference
- Specified by:
getHyperlinkReferencein interfaceJRPrintHyperlink
-
setHyperlinkReference
- Specified by:
setHyperlinkReferencein interfaceJRPrintHyperlink
-
getHyperlinkAnchor
- Specified by:
getHyperlinkAnchorin interfaceJRPrintHyperlink
-
setHyperlinkAnchor
- Specified by:
setHyperlinkAnchorin interfaceJRPrintHyperlink
-
getHyperlinkPage
- Specified by:
getHyperlinkPagein interfaceJRPrintHyperlink
-
setHyperlinkPage
- 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
Description copied from interface:JRPrintHyperlinkReturns the set of custom hyperlink parameters.- Specified by:
getHyperlinkParametersin interfaceJRPrintHyperlink- Returns:
- the set of custom hyperlink parameters
- See Also:
-
setHyperlinkParameters
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
Description copied from interface:JRPrintHyperlinkReturns the hyperlink type.- Specified by:
getLinkTypein interfaceJRPrintHyperlink- Returns:
- the hyperlink type
-
setLinkType
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
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
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
Description copied from interface:JRPrintHyperlinkReturns the hyperlink tooltip.- Specified by:
getHyperlinkTooltipin interfaceJRPrintHyperlink- Returns:
- the hyperlink tooltip
-
setHyperlinkTooltip
Description copied from interface:JRPrintHyperlinkSets the tooltip to be used for the hyperlink.- Specified by:
setHyperlinkTooltipin interfaceJRPrintHyperlink- Parameters:
hyperlinkTooltip- the tooltip
-
accept
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
- Specified by:
writeVirtualizedin interfaceVirtualizationSerializable- Overrides:
writeVirtualizedin classJRTemplatePrintElement- Throws:
IOException
-
readVirtualized
- Specified by:
readVirtualizedin interfaceVirtualizationSerializable- Overrides:
readVirtualizedin classJRTemplatePrintElement- Throws:
IOException
-