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, template
Fields 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> void
accept
(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.boolean
hasParameter
(String name) Determines whether the element includes a parameter having a given name.void
void
setParameterValue
(String name, Object value) Sets a parameter value.void
Methods 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, updateElementTemplate
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.JRCommonElement
getBackcolor, getForecolor, getMode, getOwnBackcolor, getOwnForecolor, getOwnMode, setBackcolor, setForecolor, setMode
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
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.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
Methods 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:
getGenericType
in interfaceJRGenericPrintElement
- Returns:
- the element type
- See Also:
-
getParameterNames
Description copied from interface:JRGenericPrintElement
Returns the set of parameter names for this element.- Specified by:
getParameterNames
in interfaceJRGenericPrintElement
- Returns:
- the set of parameter names (as
String
s).
-
getParameterValue
Description copied from interface:JRGenericPrintElement
Returns the value of a parameter.- Specified by:
getParameterValue
in interfaceJRGenericPrintElement
- Parameters:
name
- the parameter name- Returns:
- the parameter value, or
null
if a parameter by the specified name does not exist.
-
hasParameter
Description copied from interface:JRGenericPrintElement
Determines whether the element includes a parameter having a given name.- Specified by:
hasParameter
in interfaceJRGenericPrintElement
- Parameters:
name
- the parameter name- Returns:
- whether a parameter having the specified name exists in the element
-
setParameterValue
Description copied from interface:JRGenericPrintElement
Sets a parameter value.- Specified by:
setParameterValue
in interfaceJRGenericPrintElement
- Parameters:
name
- the parameter namevalue
- the parameter value
-
accept
Description copied from interface:JRPrintElement
Accepts a print element visitor.The element calls the method that corresponds to the element type on the visitor.
- Specified by:
accept
in interfaceJRPrintElement
- Overrides:
accept
in 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:
writeVirtualized
in interfaceVirtualizationSerializable
- Overrides:
writeVirtualized
in classJRTemplatePrintElement
- Throws:
IOException
-
readVirtualized
- Specified by:
readVirtualized
in interfaceVirtualizationSerializable
- Overrides:
readVirtualized
in classJRTemplatePrintElement
- Throws:
IOException
-