net.sf.jasperreports.engine.base
Class JRBaseGenericPrintElement

java.lang.Object
  extended by net.sf.jasperreports.engine.base.JRBasePrintElement
      extended by net.sf.jasperreports.engine.base.JRBaseGenericPrintElement
All Implemented Interfaces:
java.io.Serializable, JRCommonElement, JRGenericPrintElement, JRIdentifiable, JRPrintElement, JRPropertiesHolder, JRStyleContainer

public class JRBaseGenericPrintElement
extends JRBasePrintElement
implements JRGenericPrintElement

A basic implementation of JRGenericPrintElement.

Version:
$Id: JRBaseGenericPrintElement.java 4595 2011-09-08 15:55:10Z teodord $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.jasperreports.engine.base.JRBasePrintElement
backcolor, defaultStyleProvider, forecolor, height, key, modeValue, origin, style, uuid, width, x, y
 
Fields inherited from interface net.sf.jasperreports.engine.JRPrintElement
UNSET_SOURCE_ELEMENT_ID
 
Constructor Summary
JRBaseGenericPrintElement(JRDefaultStyleProvider defaultStyleProvider)
          Creates a generic print element.
 
Method Summary
<T> void
accept(PrintElementVisitor<T> visitor, T arg)
          Accepts a print element visitor.
 JRGenericElementType getGenericType()
          Returns the type of this element.
 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 setGenericType(JRGenericElementType genericType)
          Sets the type of this element.
 void setParameterValue(java.lang.String name, java.lang.Object value)
          Sets a parameter value.
 
Methods inherited from class net.sf.jasperreports.engine.base.JRBasePrintElement
getBackcolor, getDefaultStyleProvider, getForecolor, getHeight, getKey, getModeValue, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPropertiesMap, getSourceElementId, getStyle, getStyleNameReference, getUUID, getWidth, getX, getY, hasProperties, setBackcolor, setForecolor, setHeight, setKey, setMode, setOrigin, setSourceElementId, setStyle, setWidth, setX, setY
 
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

JRBaseGenericPrintElement

public JRBaseGenericPrintElement(JRDefaultStyleProvider defaultStyleProvider)
Creates a generic print element.

Parameters:
defaultStyleProvider - the default style provider to use for the element
See Also:
JasperPrint.getDefaultStyleProvider()
Method Detail

getGenericType

public JRGenericElementType getGenericType()
Description copied from interface: JRGenericPrintElement
Returns the type of this element.

Specified by:
getGenericType in interface JRGenericPrintElement
Returns:
the element type

setGenericType

public void setGenericType(JRGenericElementType genericType)
Sets the type of this element.

Parameters:
genericType - the type of the element
See Also:
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 JRBasePrintElement
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