Package net.sf.jasperreports.engine.fill
Class JRTemplateGenericElement
java.lang.Object
net.sf.jasperreports.engine.fill.JRTemplateElement
net.sf.jasperreports.engine.fill.JRTemplateGenericElement
- All Implemented Interfaces:
Serializable,Deduplicable,JRCommonElement,JRPropertiesHolder,JRStyleContainer
Generic print element information shared by multiple elements.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
-
Field Summary
Fields inherited from class net.sf.jasperreports.engine.fill.JRTemplateElement
defaultStyleProvider, origin, parentStyle -
Constructor Summary
ConstructorsModifierConstructorDescriptionJRTemplateGenericElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRElement element, JRGenericElementType genericType) Creates a generic print element template.protectedJRTemplateGenericElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRGenericElement element) JRTemplateGenericElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRGenericElementType genericType) Creates a generic print element template. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of the generic elements that use this template.intReturns a hash code to be used for the deduplicate map.booleanisIdentical(Object object) Determines if this instance is identical to another object.voidsetGenericType(JRGenericElementType genericType) Sets the type of the generic elements that use this template.Methods inherited from class net.sf.jasperreports.engine.fill.JRTemplateElement
addTemplateHash, getBackcolor, getBaseStyle, getDefaultStyleProvider, getForecolor, getHeight, getId, getKey, getMode, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnMode, getParentProperties, getPropertiesMap, getStyle, getStyleNameReference, getStyleResolver, getWidth, hasProperties, populateStyle, 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.JRStyleContainer
getStyleName
-
Constructor Details
-
JRTemplateGenericElement
protected JRTemplateGenericElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRGenericElement element) -
JRTemplateGenericElement
public JRTemplateGenericElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRGenericElementType genericType) Creates a generic print element template.- Parameters:
origin- the origin of the elements that will use the templatedefaultStyleProvider- the style provider to be used for the elementsgenericType- the type of the generic elements
-
JRTemplateGenericElement
public JRTemplateGenericElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRElement element, JRGenericElementType genericType) Creates a generic print element template.- Parameters:
origin- the origin of the elements that will use the templatedefaultStyleProvider- the style provider to be used for the elementselement- an element to copy basic elements fromgenericType- the type of the generic elements
-
-
Method Details
-
getGenericType
Returns the type of the generic elements that use this template.- Returns:
- the type of the generic elements
-
setGenericType
Sets the type of the generic elements that use this template.- Parameters:
genericType- the generic type
-
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.- Returns:
- deduplication hash code
-
isIdentical
Description copied from interface:DeduplicableDetermines if this instance is identical to another object.- Parameters:
object- the object to compare with this instance- Returns:
trueif the two objects are identical and can be deduplicated
-