net.sf.jasperreports.engine.fill
Class JRTemplateGenericPrintElement

java.lang.Object
  extended by net.sf.jasperreports.engine.fill.JRTemplatePrintElement
      extended by net.sf.jasperreports.engine.fill.JRTemplateGenericPrintElement
All Implemented Interfaces:
java.io.Serializable, JRCommonElement, JRGenericPrintElement, JRIdentifiable, JRPrintElement, JRPropertiesHolder, JRStyleContainer
Direct Known Subclasses:
JRRecordedValuesGenericPrintElement

public class JRTemplateGenericPrintElement
extends JRTemplatePrintElement
implements JRGenericPrintElement

Implementation of JRGenericPrintElement that uses a JRTemplateGenericElement instance to store common attributes.

Version:
$Id: JRTemplateGenericPrintElement.java 4648 2011-10-10 12:50:53Z lucianc $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
JRTemplateGenericPrintElement, Serialized Form

Field Summary
 
Fields inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintElement
template
 
Fields inherited from interface net.sf.jasperreports.engine.JRPrintElement
UNSET_SOURCE_ELEMENT_ID
 
Constructor Summary
JRTemplateGenericPrintElement(JRTemplateGenericElement template)
          Deprecated. provide a source Id via JRTemplateGenericPrintElement(JRTemplateGenericElement, int)
JRTemplateGenericPrintElement(JRTemplateGenericElement template, int sourceElementId)
          Creates a generic print element.
 
Method Summary
<T> void
accept(PrintElementVisitor<T> visitor, T arg)
          Accepts a print element visitor.
 JRGenericElementType getGenericType()
          Returns the generic type specified by the element template.
 java.util.Set<java.lang.String> getParameterNames()
          Returns the set of parameter names for this element.
 java.lang.Object getParameterValue(java.lang.String name)
          Returns the value of a parameter.
 boolean hasParameter(java.lang.String name)
          Determines whether the element includes a parameter having a given name.
 void setParameterValue(java.lang.String name, java.lang.Object value)
          Sets a parameter value.
 
Methods inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintElement
getBackcolor, getDefaultLineColor, getDefaultStyleProvider, getForecolor, getHeight, getKey, getModeValue, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPropertiesMap, getSourceElementId, getStyle, getStyleNameReference, getTemplate, getUUID, getWidth, getX, getY, hasProperties, setBackcolor, setForecolor, setHeight, setMode, setSourceElementId, setStyle, setTemplate, 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.JRPrintElement
getHeight, getKey, getOrigin, getSourceElementId, getWidth, getX, getY, setHeight, setStyle, setWidth, setX, setY
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, setBackcolor, setForecolor, setMode
 
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
 
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
 
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
 

Constructor Detail

JRTemplateGenericPrintElement

public JRTemplateGenericPrintElement(JRTemplateGenericElement template)
Deprecated. provide a source Id via JRTemplateGenericPrintElement(JRTemplateGenericElement, int)

Creates a generic print element.

Parameters:
template - the template to use for the element

JRTemplateGenericPrintElement

public JRTemplateGenericPrintElement(JRTemplateGenericElement template,
                                     int sourceElementId)
Creates a generic print element.

Parameters:
template - the template to use for the element
sourceElementId - the Id of the source element
Method Detail

getGenericType

public JRGenericElementType getGenericType()
Returns the generic type specified by the element template.

Specified by:
getGenericType in interface JRGenericPrintElement
Returns:
the element type
See Also:
JRTemplateGenericElement.getGenericType()

getParameterNames

public java.util.Set<java.lang.String> getParameterNames()
Description copied from interface: JRGenericPrintElement
Returns the set of parameter names for this element.

Specified by:
getParameterNames in interface JRGenericPrintElement
Returns:
the set of parameter names (as Strings).

getParameterValue

public java.lang.Object getParameterValue(java.lang.String name)
Description copied from interface: JRGenericPrintElement
Returns the value of a parameter.

Specified by:
getParameterValue in interface JRGenericPrintElement
Parameters:
name - the parameter name
Returns:
the parameter value, or null if a parameter by the specified name does not exist.

hasParameter

public boolean hasParameter(java.lang.String name)
Description copied from interface: JRGenericPrintElement
Determines whether the element includes a parameter having a given name.

Specified by:
hasParameter in interface JRGenericPrintElement
Parameters:
name - the parameter name
Returns:
whether a parameter having the specified name exists in the element

setParameterValue

public void setParameterValue(java.lang.String name,
                              java.lang.Object value)
Description copied from interface: JRGenericPrintElement
Sets a parameter value.

Specified by:
setParameterValue in interface JRGenericPrintElement
Parameters:
name - the parameter name
value - the parameter value

accept

public <T> void accept(PrintElementVisitor<T> visitor,
                       T arg)
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 interface JRPrintElement
Overrides:
accept in class JRTemplatePrintElement
Type Parameters:
T - the type of the argument passed to the visit operation
Parameters:
visitor - the visitor objects
arg - the argument passed to the visit operation


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com