net.sf.jasperreports.engine.design

## Class JRDesignGenericElement

- java.lang.Object
- - net.sf.jasperreports.engine.base.JRBaseElement
  - - net.sf.jasperreports.engine.design.JRDesignElement
    - - net.sf.jasperreports.engine.design.JRDesignGenericElement

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, JRChangeEventsSupport, JRChild, JRCloneable, JRCommonElement, JRElement, JRGenericElement, JRIdentifiable, JRPropertiesHolder, JRStyleContainer, JRVisitable

      public class JRDesignGenericElement
      extends JRDesignElement
      implements JRGenericElement

  A implementation of `JRGenericElement` that is to be used at report design time.
  Version:
    $Id: JRDesignGenericElement.java 5878 2013-01-07 20:23:13Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `PROPERTY_EVALUATION_GROUP_NAME`
    `static java.lang.String` | `PROPERTY_EVALUATION_TIME`
    `static java.lang.String` | `PROPERTY_GENERIC_TYPE`
    `static java.lang.String` | `PROPERTY_PARAMETERS`

    - ### Fields inherited from class net.sf.jasperreports.engine.design.JRDesignElement

      `PROPERTY_ELEMENT_GROUP, PROPERTY_HEIGHT, PROPERTY_KEY, PROPERTY_PARENT_STYLE, PROPERTY_PARENT_STYLE_NAME_REFERENCE, PROPERTY_PRINT_WHEN_EXPRESSION, PROPERTY_PRINT_WHEN_GROUP_CHANGES, PROPERTY_PROPERTY_EXPRESSIONS, PROPERTY_Y`

    - ### Fields inherited from class net.sf.jasperreports.engine.base.JRBaseElement

      `backcolor, defaultStyleProvider, elementGroup, forecolor, height, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, key, modeValue, parentStyle, parentStyleNameReference, positionTypeValue, printWhenExpression, printWhenGroupChanges, PROPERTY_POSITION_TYPE, PROPERTY_PRINT_IN_FIRST_WHOLE_BAND, PROPERTY_PRINT_REPEATED_VALUES, PROPERTY_PRINT_WHEN_DETAIL_OVERFLOWS, PROPERTY_REMOVE_LINE_WHEN_BLANK, PROPERTY_STRETCH_TYPE, PROPERTY_WIDTH, PROPERTY_X, stretchTypeValue, uuid, width, x, y`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JRDesignGenericElement(JRDefaultStyleProvider defaultStyleProvider)` Creates a generic report element.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addParameter(JRGenericElementParameter parameter)` Adds a parameter to the element.
    `java.lang.Object` | `clone()`
    `void` | `collectExpressions(JRExpressionCollector collector)`
    `java.lang.String` | `getEvaluationGroupName()` Returns the name of the evaluation group for this element.
    `EvaluationTimeEnum` | `getEvaluationTimeValue()` Returns the evaluation time of this element.
    `JRGenericElementType` | `getGenericType()` Returns the generic type of this element.
    `JRGenericElementParameter[]` | `getParameters()` Returns the list of parameters of this element.
    `java.util.List<JRGenericElementParameter>` | `getParametersList()` Exposes the internal list of element parameters.
    `java.util.List<JRGenericElementParameter>` | `getParamtersList()` Deprecated. Replaced by `getParametersList()`.
    `boolean` | `removeParameter(JRGenericElementParameter parameter)` Removes a parameter from the element.
    `JRGenericElementParameter` | `removeParameter(java.lang.String parameterName)` Removes a parameter by name from the element.
    `void` | `setEvaluationGroupName(java.lang.String evaluationGroupName)` Sets the name of the evaluation group.
    `void` | `setEvaluationTime(EvaluationTimeEnum evaluationTimeValue)` Sets the evaluation time for the element.
    `void` | `setGenericType(JRGenericElementType genericType)` Sets the type of the generic element.
    `void` | `visit(JRVisitor visitor)`

    - ### Methods inherited from class net.sf.jasperreports.engine.design.JRDesignElement

      `addPropertyExpression, getPropertyExpressions, getPropertyExpressionsList, removePropertyExpression, removePropertyExpression, setElementGroup, setHeight, setKey, setPrintWhenExpression, setPrintWhenGroupChanges, setStyle, setStyleNameReference, setUUID, setY`

    - ### Methods inherited from class net.sf.jasperreports.engine.base.JRBaseElement

      `clone, clone, getBackcolor, getBaseStyle, getDefaultStyleProvider, getElementGroup, getEventSupport, getForecolor, getHeight, getKey, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertiesMap, getStretchTypeValue, getStyle, getStyleNameReference, getUUID, getWidth, getX, getY, hasProperties, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setBackcolor, setForecolor, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

      `clone, getElementGroup, getKey, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchTypeValue, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX`

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

      `clone`

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

      `getBackcolor, getForecolor, getHeight, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, 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`

- - ### Field Detail

    - #### PROPERTY_GENERIC_TYPE

          public static final java.lang.String PROPERTY_GENERIC_TYPE

      See Also:
        Constant Field Values

    - #### PROPERTY_EVALUATION_TIME

          public static final java.lang.String PROPERTY_EVALUATION_TIME

      See Also:
        Constant Field Values

    - #### PROPERTY_EVALUATION_GROUP_NAME

          public static final java.lang.String PROPERTY_EVALUATION_GROUP_NAME

      See Also:
        Constant Field Values

    - #### PROPERTY_PARAMETERS

          public static final java.lang.String PROPERTY_PARAMETERS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### JRDesignGenericElement

          public JRDesignGenericElement(JRDefaultStyleProvider defaultStyleProvider)

      Creates a generic report element.
      Parameters:
        `defaultStyleProvider` - the default style provider to use for the element

  - ### Method Detail

    - #### getParameters

          public JRGenericElementParameter[] getParameters()

      Description copied from interface: `JRGenericElement`
      Returns the list of parameters of this element.
      Specified by:
        `getParameters` in interface `JRGenericElement`
      Returns:
        the list of parameters

    - #### getParamtersList

          public java.util.List<JRGenericElementParameter> getParamtersList()

      Deprecated. Replaced by `getParametersList()`.

    - #### getParametersList

          public java.util.List<JRGenericElementParameter> getParametersList()

      Exposes the internal list of element parameters.
      Returns:
        the list of element parameters
      See Also:
        `getParameters()`

    - #### addParameter

          public void addParameter(JRGenericElementParameter parameter)

      Adds a parameter to the element.
      Parameters:
        `parameter` - the parameter to add.
      See Also:
        `getParameters()`

    - #### removeParameter

          public boolean removeParameter(JRGenericElementParameter parameter)

      Removes a parameter from the element.
      Parameters:
        `parameter` - the parameter to remove
      Returns:
        whether the parameter has been found and removed

    - #### removeParameter

          public JRGenericElementParameter removeParameter(java.lang.String parameterName)

      Removes a parameter by name from the element.
      Parameters:
        `parameterName` - the name of the parameter to remove
      Returns:
        the removed parameter, or `null` if not found

    - #### getGenericType

          public JRGenericElementType getGenericType()

      Description copied from interface: `JRGenericElement`
      Returns the generic type of this element. This type will be propagated to the generated print element, and used to resolve export handler for the print element.
      Specified by:
        `getGenericType` in interface `JRGenericElement`
      Returns:
        the generic type of this element

    - #### setGenericType

          public void setGenericType(JRGenericElementType genericType)

      Sets the type of the generic element.
      Parameters:
        `genericType` - the type of the element.
      See Also:
        `getGenericType()`

    - #### collectExpressions

          public void collectExpressions(JRExpressionCollector collector)

      Specified by:
        `collectExpressions` in interface `JRElement`

    - #### visit

          public void visit(JRVisitor visitor)

      Specified by:
        `visit` in interface `JRVisitable`

    - #### getEvaluationTimeValue

          public EvaluationTimeEnum getEvaluationTimeValue()

      Description copied from interface: `JRGenericElement`
      Returns the evaluation time of this element.

      The evaluation time determines the moment at which parameter expressions are evaluated for this element. All parameters will be evaluated at the same moment.

      Specified by:
        `getEvaluationTimeValue` in interface `JRGenericElement`
      Returns:
        the evaluation time of this element

    - #### setEvaluationTime

          public void setEvaluationTime(EvaluationTimeEnum evaluationTimeValue)

      Sets the evaluation time for the element.

      The default evaluation time is `EvaluationTimeEnum.NOW`.

      Parameters:
        `evaluationTimeValue` - the element's evaluation time, one of
        1. `EvaluationTimeEnum.NOW`
        2. `EvaluationTimeEnum.BAND`
        3. `EvaluationTimeEnum.COLUMN`
        4. `EvaluationTimeEnum.PAGE`
        5. `EvaluationTimeEnum.GROUP`
        6. `EvaluationTimeEnum.REPORT`
        7. `EvaluationTimeEnum.AUTO`
    See Also:
      `getEvaluationTimeValue()`

  - #### getEvaluationGroupName

        public java.lang.String getEvaluationGroupName()

    Description copied from interface: `JRGenericElement`
    Returns the name of the evaluation group for this element. The evaluation group is only present when `the evaluation time` is `EvaluationTimeEnum.GROUP`.
    Specified by:
      `getEvaluationGroupName` in interface `JRGenericElement`
    Returns:
      the name of the evaluation group for this element

  - #### setEvaluationGroupName

        public void setEvaluationGroupName(java.lang.String evaluationGroupName)

    Sets the name of the evaluation group.
    Parameters:
      `evaluationGroupName` - the evaluation group's name
    See Also:
      `getEvaluationGroupName()`

  - #### clone

        public java.lang.Object clone()

    Specified by:
      `clone` in interface `JRCloneable`
    Overrides:
      `clone` in class `JRDesignElement`

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com