net.sf.jasperreports.engine.base

## Class JRBaseGenericPrintElement

- java.lang.Object
- - net.sf.jasperreports.engine.base.JRBasePrintElement
  - - 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 5878 2013-01-07 20:23:13Z 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_PRINT_ELEMENT_ID, UNSET_SOURCE_ELEMENT_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JRBaseGenericPrintElement(JRDefaultStyleProvider defaultStyleProvider)` Creates a generic print element.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<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, getPrintElementId, getPropertiesMap, getSourceElementId, getStyle, getStyleNameReference, getUUID, getWidth, getX, getY, hasProperties, setBackcolor, setForecolor, setHeight, setKey, setMode, setOrigin, setPrintElementId, setSourceElementId, setStyle, setUUID, 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, getPrintElementId, getSourceElementId, getWidth, getX, getY, setHeight, setStyle, setUUID, 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.JRPropertiesHolder

      `getParentProperties, getPropertiesMap, hasProperties`

    - ### Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable

      `getUUID`

- - ### 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 `String`s).

    - #### 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