Class JRTemplateImage
- All Implemented Interfaces:
Serializable,Deduplicable,JRBoxContainer,JRCommonElement,JRCommonGraphicElement,JRCommonImage,JRImageAlignment,JRPenContainer,JRPropertiesHolder,JRStyleContainer
- Direct Known Subclasses:
ChartTemplateImage
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsFields inherited from class net.sf.jasperreports.engine.fill.JRTemplateGraphicElement
linePenFields inherited from class net.sf.jasperreports.engine.fill.JRTemplateElement
defaultStyleProvider, origin, parentStyle -
Constructor Summary
ConstructorsModifierConstructorDescriptionJRTemplateImage(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider) Creates a template image.protectedJRTemplateImage(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRImage image) -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyLineBox(JRLineBox box) Copies box attributes.intReturns a hash code to be used for the deduplicate map.Gets the image horizontal alignment.Retrieves the hyperlink type for the element.Returns the hyperlink target name.Returns the hyperlink type.getMode()Returns the element transparency mode.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.booleanisIdentical(Object object) Determines if this instance is identical to another object.booleanisLazy()booleanvoidvoidsetHorizontalImageAlign(HorizontalImageAlignEnum horizontalImageAlign) Sets the image horizontal alignment.protected voidsetHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget) protected voidsetHyperlinkType(HyperlinkTypeEnum hyperlinkType) Sets the link type as a built-in hyperlink type.protected voidvoidsetLazy(boolean isLazy) voidsetLinkTarget(String linkTarget) Sets the hyperlink target name.voidsetLinkType(String linkType) Sets the hyperlink type.voidsetOnErrorType(OnErrorTypeEnum onErrorType) voidsetRotation(RotationEnum rotation) Sets the image rotation.voidsetScaleImage(ScaleImageEnum scaleImage) Sets the image scale type.voidsetUsingCache(boolean isUsingCache) voidsetUsingCache(Boolean isUsingCache) voidsetVerticalImageAlign(VerticalImageAlignEnum verticalImageAlign) Gets the image vertical alignment.Methods inherited from class net.sf.jasperreports.engine.fill.JRTemplateGraphicElement
addGraphicHash, copyLinePen, getDefaultLineColor, getFill, getLinePen, getOwnFill, graphicIdentical, setFill, setGraphicElementMethods inherited from class net.sf.jasperreports.engine.fill.JRTemplateElement
addTemplateHash, getBackcolor, getBaseStyle, getDefaultStyleProvider, getForecolor, getHeight, getId, getKey, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnMode, getParentProperties, getPropertiesMap, getStyle, getStyleNameReference, getStyleResolver, getWidth, hasProperties, setBackcolor, setElement, setForecolor, setKey, setMode, setStyle, templateIdenticalMethods 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, getHeight, getKey, getOwnBackcolor, getOwnForecolor, getOwnMode, getWidth, setBackcolor, setForecolor, setModeMethods inherited from interface net.sf.jasperreports.engine.JRCommonGraphicElement
getFill, getLinePen, getOwnFill, setFillMethods inherited from interface net.sf.jasperreports.engine.JRPenContainer
getDefaultLineColorMethods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleName, getStyleNameReference
-
Field Details
-
isLazy
protected boolean isLazy -
onErrorType
-
-
Constructor Details
-
JRTemplateImage
protected JRTemplateImage(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRImage image) -
JRTemplateImage
Creates a template image.- Parameters:
origin- the origin of the elements that will use this templatedefaultStyleProvider- the default style provider to use for this template
-
-
Method Details
-
setImage
-
copyLineBox
Copies box attributes.- Parameters:
box- the object to copy attributes from
-
getLineBox
- Specified by:
getLineBoxin interfaceJRBoxContainer
-
getMode
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:
getModein interfaceJRCommonElement- Overrides:
getModein classJRTemplateElement
-
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() -
setUsingCache
public void setUsingCache(boolean isUsingCache) -
setUsingCache
-
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:
horizontalImageAlign- 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:
verticalImageAlign- a value representing one of the vertical image alignment constants inVerticalImageAlignEnum
-
isLazy
public boolean isLazy() -
setLazy
public void setLazy(boolean isLazy) -
getOnErrorType
-
setOnErrorType
-
getHyperlinkType
Retrieves 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.- Returns:
- one of the hyperlink type constants
- See Also:
-
setHyperlinkType
Sets the link type as a built-in hyperlink type.- Parameters:
hyperlinkType- the built-in hyperlink type- See Also:
-
getHyperlinkTarget
-
setHyperlinkTarget
-
getLinkTarget
Returns 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.
- Returns:
- the hyperlink type
-
setLinkTarget
Sets 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.
- Parameters:
linkTarget- the hyperlink target name
-
getLinkType
Returns the hyperlink type.The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.
- Returns:
- the hyperlink type
-
setLinkType
Sets the hyperlink type.The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.
- Parameters:
linkType- the hyperlink type
-
getDefaultLineWidth
- Specified by:
getDefaultLineWidthin interfaceJRPenContainer- Overrides:
getDefaultLineWidthin classJRTemplateGraphicElement
-
getHashCode
public int getHashCode()Description copied from interface:DeduplicableReturns a hash code to be used for the deduplicate map. The returned hash code should be consitent wiwhDeduplicable.isIdentical(Object), i.e. if two objects are identical they should have the same hash code.- Specified by:
getHashCodein interfaceDeduplicable- Returns:
- deduplication hash code
-
isIdentical
Description copied from interface:DeduplicableDetermines if this instance is identical to another object.- Specified by:
isIdenticalin interfaceDeduplicable- Parameters:
object- the object to compare with this instance- Returns:
trueif the two objects are identical and can be deduplicated
-
populateStyle
public void populateStyle()- Overrides:
populateStylein classJRTemplateGraphicElement
-