Class JRBasePrintImage
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBasePrintElement
-
- net.sf.jasperreports.engine.base.JRBasePrintGraphicElement
-
- net.sf.jasperreports.engine.base.JRBasePrintImage
-
- All Implemented Interfaces:
java.io.Serializable,JRBoxContainer,JRCommonElement,JRCommonGraphicElement,JRCommonImage,JRIdentifiable,JRImageAlignment,JRPenContainer,JRPrintAnchor,JRPrintElement,JRPrintGraphicElement,JRPrintHyperlink,JRPrintImage,JRPropertiesHolder,JRStyleContainer
public class JRBasePrintImage extends JRBasePrintGraphicElement implements JRPrintImage
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringanchorNameprotected intbookmarkLevelThe bookmark level for the anchor associated with this field.protected HorizontalImageAlignEnumhorizontalImageAlignprotected java.lang.StringhyperlinkAnchorprotected java.lang.IntegerhyperlinkPageprotected JRPrintHyperlinkParametershyperlinkParametersprotected java.lang.StringhyperlinkReferenceprotected java.lang.StringhyperlinkTooltipprotected java.lang.BooleanisUsingCacheprotected JRLineBoxlineBoxprotected java.lang.StringlinkTargetprotected java.lang.StringlinkTypeprotected OnErrorTypeEnumonErrorTypeValueprotected Renderablerenderableprotected RotationEnumrotationprotected ScaleImageEnumscaleImageValueprotected VerticalImageAlignEnumverticalImageAlign-
Fields inherited from class net.sf.jasperreports.engine.base.JRBasePrintGraphicElement
fillValue, linePen
-
Fields inherited from class net.sf.jasperreports.engine.base.JRBasePrintElement
backcolor, defaultStyleProvider, forecolor, height, key, modeValue, origin, style, uuid, width, x, y
-
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 JRBasePrintImage(JRDefaultStyleProvider defaultStyleProvider)
-
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.voidaddHyperlinkParameter(JRPrintHyperlinkParameter parameter)Adds a custom hyperlink parameter.voidcopyBox(JRLineBox lineBox)java.lang.StringgetAnchorName()intgetBookmarkLevel()Returns the level of the bookmark corresponding to the anchor.java.lang.FloatgetDefaultLineWidth()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.ModeEnumgetModeValue()Returns the element transparency mode.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()voidsetAnchorName(java.lang.String anchorName)voidsetBookmarkLevel(int bookmarkLevel)Sets the boomark level for the anchor.voidsetHorizontalImageAlign(HorizontalImageAlignEnum horizontalImageAlign)Sets the image horizontal alignment.voidsetHyperlinkAnchor(java.lang.String hyperlinkAnchor)voidsetHyperlinkPage(java.lang.Integer hyperlinkPage)voidsetHyperlinkPage(java.lang.String hyperlinkPage)voidsetHyperlinkParameters(JRPrintHyperlinkParameters hyperlinkParameters)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 linkTarget)Sets the hyperlink target name.voidsetLinkType(java.lang.String linkType)Sets the hyperlink type.voidsetOnErrorType(OnErrorTypeEnum onErrorTypeValue)voidsetRenderable(Renderable renderable)Deprecated.voidsetRenderer(Renderable renderable)voidsetRotation(RotationEnum rotation)Sets the image rotation.voidsetScaleImage(ScaleImageEnum scaleImageValue)Sets the image scale type.voidsetUsingCache(boolean isUsingCache)voidsetVerticalImageAlign(VerticalImageAlignEnum verticalImageAlign)Gets the image vertical alignment.-
Methods inherited from class net.sf.jasperreports.engine.base.JRBasePrintGraphicElement
copyPen, getDefaultLineColor, getFillValue, getLinePen, getOwnFillValue, setFill
-
Methods inherited from class net.sf.jasperreports.engine.base.JRBasePrintElement
getBackcolor, getDefaultStyleProvider, getForecolor, getHeight, getKey, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPrintElementId, getPropertiesMap, getSourceElementId, getStyle, getStyleNameReference, getStyleResolver, getUUID, getWidth, getX, getY, hasProperties, setBackcolor, setForecolor, setHeight, setKey, setMode, setOrigin, setPrintElementId, setSourceElementId, setStyle, setUUID, setWidth, setX, setY
-
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, 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
-
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
-
renderable
protected Renderable renderable
-
scaleImageValue
protected ScaleImageEnum scaleImageValue
-
rotation
protected RotationEnum rotation
-
isUsingCache
protected java.lang.Boolean isUsingCache
-
horizontalImageAlign
protected HorizontalImageAlignEnum horizontalImageAlign
-
verticalImageAlign
protected VerticalImageAlignEnum verticalImageAlign
-
onErrorTypeValue
protected OnErrorTypeEnum onErrorTypeValue
-
lineBox
protected JRLineBox lineBox
-
anchorName
protected java.lang.String anchorName
-
linkType
protected java.lang.String linkType
-
linkTarget
protected java.lang.String linkTarget
-
hyperlinkReference
protected java.lang.String hyperlinkReference
-
hyperlinkAnchor
protected java.lang.String hyperlinkAnchor
-
hyperlinkPage
protected java.lang.Integer hyperlinkPage
-
hyperlinkTooltip
protected java.lang.String hyperlinkTooltip
-
hyperlinkParameters
protected JRPrintHyperlinkParameters hyperlinkParameters
-
bookmarkLevel
protected int bookmarkLevel
The bookmark level for the anchor associated with this field.- See Also:
JRAnchor.getBookmarkLevel()
-
-
Constructor Detail
-
JRBasePrintImage
public JRBasePrintImage(JRDefaultStyleProvider defaultStyleProvider)
-
-
Method Detail
-
getModeValue
public ModeEnum getModeValue()
Description copied from interface:JRCommonElementReturns the element transparency mode. The default value depends on the type of the report element. Graphic elements like rectangles and lines are opaque by default, but the images are transparent. Both static texts and text fields are transparent by default, and so are the subreport elements.- Specified by:
getModeValuein interfaceJRCommonElement- Overrides:
getModeValuein classJRBasePrintElement
-
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 scaleImageValue)
Description copied from interface:JRCommonImageSets the image scale type.- Specified by:
setScaleImagein interfaceJRCommonImage- Parameters:
scaleImageValue- 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 horizontalImageAlign)
Description copied from interface:JRImageAlignmentSets the image horizontal alignment.- Specified by:
setHorizontalImageAlignin interfaceJRImageAlignment- Parameters:
horizontalImageAlign- 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 verticalImageAlign)
Description copied from interface:JRImageAlignmentGets the image vertical alignment.- Specified by:
setVerticalImageAlignin interfaceJRImageAlignment- Parameters:
verticalImageAlign- 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 onErrorTypeValue)
- Specified by:
setOnErrorTypein interfaceJRPrintImage
-
getLineBox
public JRLineBox getLineBox()
- Specified by:
getLineBoxin interfaceJRBoxContainer
-
copyBox
public void copyBox(JRLineBox lineBox)
-
getDefaultLineWidth
public java.lang.Float getDefaultLineWidth()
- Specified by:
getDefaultLineWidthin interfaceJRPenContainer- Overrides:
getDefaultLineWidthin classJRBasePrintGraphicElement
-
getAnchorName
public java.lang.String getAnchorName()
- Specified by:
getAnchorNamein interfaceJRPrintAnchor
-
setAnchorName
public void setAnchorName(java.lang.String anchorName)
- Specified by:
setAnchorNamein interfaceJRPrintAnchor
-
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
-
setHyperlinkPage
public void setHyperlinkPage(java.lang.String hyperlinkPage)
-
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 hyperlinkParameters)
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:
hyperlinkParameters- the set of custom hyperlink parameters
-
addHyperlinkParameter
public void addHyperlinkParameter(JRPrintHyperlinkParameter parameter)
Adds a custom hyperlink parameter.- Parameters:
parameter- the parameter to add- See Also:
getHyperlinkParameters(),JRPrintHyperlinkParameters.addParameter(JRPrintHyperlinkParameter)
-
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 linkType)
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:
linkType- 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 linkTarget)
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:
linkTarget- 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 classJRBasePrintElement- 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
-
-