Package net.sf.jasperreports.engine.fill
Class JRTemplateElement
java.lang.Object
net.sf.jasperreports.engine.fill.JRTemplateElement
- All Implemented Interfaces:
Serializable,Deduplicable,JRCommonElement,JRPropertiesHolder,JRStyleContainer
- Direct Known Subclasses:
JRTemplateFrame,JRTemplateGenericElement,JRTemplateGraphicElement,JRTemplateText,JRVirtualPrintPage.JRIdHolderTemplateElement
public abstract class JRTemplateElement
extends Object
implements JRCommonElement, Serializable, JRPropertiesHolder, Deduplicable
Base class consisting of print element information shared by multiple
print elements.
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JRDefaultStyleProviderprotected JROriginprotected JRStyle -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedJRTemplateElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected JRStyleintgetId()getKey()Returns the string value that uniquely identifies the element.getMode()Returns the element transparency mode.Returns the parent properties holder, whose properties are used as defaults for this object.Returns this object's properties map.getStyle()Returns this object's style.Returns null as external style references are not allowed for print objects.protected StyleResolverintgetWidth()booleanChecks whether the object has any properties.voidvoidsetBackcolor(Color backcolor) voidsetElement(JRElement element) Copies basic element attributes: the element style, key, mode, forecolor and backcolor.voidsetForecolor(Color forecolor) voidvoidSets the element transparency mode.voidSets the template element style.protected booleantemplateIdentical(JRTemplateElement template) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.jasperreports.engine.Deduplicable
getHashCode, isIdenticalMethods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getStyleName
-
Field Details
-
origin
-
defaultStyleProvider
-
parentStyle
-
-
Constructor Details
-
JRTemplateElement
-
JRTemplateElement
-
-
Method Details
-
setElement
Copies basic element attributes: the element style, key, mode, forecolor and backcolor.- Parameters:
element- the element to copy attributes from
-
getOrigin
-
getDefaultStyleProvider
- Specified by:
getDefaultStyleProviderin interfaceJRStyleContainer
-
getStyleResolver
-
getStyle
Description copied from interface:JRStyleContainerReturns this object's style.- Specified by:
getStylein interfaceJRStyleContainer- Returns:
- this object's style
-
getBaseStyle
-
getWidth
public int getWidth()- Specified by:
getWidthin interfaceJRCommonElement
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceJRCommonElement
-
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
-
getOwnMode
- Specified by:
getOwnModein interfaceJRCommonElement
-
setMode
Description copied from interface:JRCommonElementSets the element transparency mode.- Specified by:
setModein interfaceJRCommonElement
-
getForecolor
- Specified by:
getForecolorin interfaceJRCommonElement
-
getOwnForecolor
- Specified by:
getOwnForecolorin interfaceJRCommonElement
-
setForecolor
- Specified by:
setForecolorin interfaceJRCommonElement
-
getBackcolor
- Specified by:
getBackcolorin interfaceJRCommonElement
-
getOwnBackcolor
- Specified by:
getOwnBackcolorin interfaceJRCommonElement
-
setBackcolor
- Specified by:
setBackcolorin interfaceJRCommonElement
-
getId
-
getKey
Description copied from interface:JRCommonElementReturns the string value that uniquely identifies the element.- Specified by:
getKeyin interfaceJRCommonElement
-
setKey
-
getStyleNameReference
Returns null as external style references are not allowed for print objects.- Specified by:
getStyleNameReferencein interfaceJRStyleContainer- Returns:
- the name of an external style
-
hasProperties
public boolean hasProperties()Description copied from interface:JRPropertiesHolderChecks whether the object has any properties.- Specified by:
hasPropertiesin interfaceJRPropertiesHolder- Returns:
- whether the object has any properties
-
getPropertiesMap
Description copied from interface:JRPropertiesHolderReturns this object's properties map.- Specified by:
getPropertiesMapin interfaceJRPropertiesHolder- Returns:
- this object's properties map
-
getParentProperties
Description copied from interface:JRPropertiesHolderReturns the parent properties holder, whose properties are used as defaults for this object.- Specified by:
getParentPropertiesin interfaceJRPropertiesHolder- Returns:
- the parent properties holder, or
nullif no parent
-
setStyle
Sets the template element style.- Parameters:
style- the style
-
addTemplateHash
-
templateIdentical
-
populateStyle
public void populateStyle()
-