Package net.sf.jasperreports.engine.fill
Class JRTemplateGenericPrintElement
java.lang.Object
net.sf.jasperreports.engine.fill.JRTemplatePrintElement
net.sf.jasperreports.engine.fill.JRTemplateGenericPrintElement
- All Implemented Interfaces:
Serializable,JRCommonElement,JRGenericPrintElement,JRIdentifiable,JRPrintElement,JRPropertiesHolder,JRStyleContainer,VirtualizationSerializable
- Direct Known Subclasses:
JRRecordedValuesGenericPrintElement
public class JRTemplateGenericPrintElement
extends JRTemplatePrintElement
implements JRGenericPrintElement
Implementation of
JRGenericPrintElement that uses
a JRTemplateGenericElement instance to
store common attributes.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
-
Field Summary
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_ID -
Constructor Summary
ConstructorsConstructorDescriptionJRTemplateGenericPrintElement(JRTemplateGenericElement template, PrintElementOriginator originator) Creates a generic print element.JRTemplateGenericPrintElement(JRTemplateGenericElement template, PrintElementOriginator originator, int parameterCount) Creates a generic print element. -
Method Summary
Modifier and TypeMethodDescription<T> voidaccept(PrintElementVisitor<T> visitor, T arg) Accepts a print element visitor.Returns the generic type specified by the element template.Returns the set of parameter names for this element.getParameterValue(String name) Returns the value of a parameter.booleanhasParameter(String name) Determines whether the element includes a parameter having a given name.voidvoidsetParameterValue(String name, Object value) Sets a parameter value.voidMethods inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintElement
getBackcolor, getDefaultLineColor, 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.JRCommonElement
getBackcolor, getForecolor, getMode, getOwnBackcolor, getOwnForecolor, getOwnMode, setBackcolor, setForecolor, setModeMethods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUIDMethods 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.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasPropertiesMethods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleName, getStyleNameReference
-
Constructor Details
-
JRTemplateGenericPrintElement
public JRTemplateGenericPrintElement() -
JRTemplateGenericPrintElement
public JRTemplateGenericPrintElement(JRTemplateGenericElement template, PrintElementOriginator originator) Creates a generic print element.- Parameters:
template- the template to use for the elementoriginator-
-
JRTemplateGenericPrintElement
public JRTemplateGenericPrintElement(JRTemplateGenericElement template, PrintElementOriginator originator, int parameterCount) Creates a generic print element.- Parameters:
template- the template to use for the elementoriginator-parameterCount- the number of parameters that the element will have
-
-
Method Details
-
getGenericType
Returns the generic type specified by the element template.- Specified by:
getGenericTypein interfaceJRGenericPrintElement- Returns:
- the element type
- See Also:
-
getParameterNames
Description copied from interface:JRGenericPrintElementReturns the set of parameter names for this element.- Specified by:
getParameterNamesin interfaceJRGenericPrintElement- Returns:
- the set of parameter names (as
Strings).
-
getParameterValue
Description copied from interface:JRGenericPrintElementReturns the value of a parameter.- Specified by:
getParameterValuein interfaceJRGenericPrintElement- Parameters:
name- the parameter name- Returns:
- the parameter value, or
nullif a parameter by the specified name does not exist.
-
hasParameter
Description copied from interface:JRGenericPrintElementDetermines whether the element includes a parameter having a given name.- Specified by:
hasParameterin interfaceJRGenericPrintElement- Parameters:
name- the parameter name- Returns:
- whether a parameter having the specified name exists in the element
-
setParameterValue
Description copied from interface:JRGenericPrintElementSets a parameter value.- Specified by:
setParameterValuein interfaceJRGenericPrintElement- Parameters:
name- the parameter namevalue- the parameter value
-
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
-