Class JRDesignElement

    • Field Detail

      • PROPERTY_ELEMENT_GROUP

        public static final java.lang.String PROPERTY_ELEMENT_GROUP
        See Also:
        Constant Field Values
      • PROPERTY_PRINT_WHEN_EXPRESSION

        public static final java.lang.String PROPERTY_PRINT_WHEN_EXPRESSION
        See Also:
        Constant Field Values
      • PROPERTY_PRINT_WHEN_GROUP_CHANGES

        public static final java.lang.String PROPERTY_PRINT_WHEN_GROUP_CHANGES
        See Also:
        Constant Field Values
      • PROPERTY_PARENT_STYLE

        public static final java.lang.String PROPERTY_PARENT_STYLE
        See Also:
        Constant Field Values
      • PROPERTY_PARENT_STYLE_NAME_REFERENCE

        public static final java.lang.String PROPERTY_PARENT_STYLE_NAME_REFERENCE
        See Also:
        Constant Field Values
      • PROPERTY_STYLE_EXPRESSION

        public static final java.lang.String PROPERTY_STYLE_EXPRESSION
        See Also:
        Constant Field Values
      • PROPERTY_PROPERTY_EXPRESSIONS

        public static final java.lang.String PROPERTY_PROPERTY_EXPRESSIONS
        See Also:
        Constant Field Values
    • Method Detail

      • setKey

        public void setKey​(java.lang.String key)
        Sets the unique identifier for the element.
      • setY

        public void setY​(int y)
        Sets the vertical section relative offset for the element.
      • setHeight

        public void setHeight​(int height)
      • setPrintWhenExpression

        public void setPrintWhenExpression​(JRExpression expression)
        Sets the print when expression. This expression must always return an instance of Boolean and its value will decide if the element will be displayed.
      • setPrintWhenGroupChanges

        public void setPrintWhenGroupChanges​(JRGroup group)
        Specifies the group for which an element with a printRepeatedValues attribute set to true will be redisplayed even if the value has not changed.
      • setElementGroup

        public void setElementGroup​(JRElementGroup elementGroup)
        Specifies the logical group that the element belongs to. More elements can be grouped in order to make some of them stretch relative to the height of their parent group.
        See Also:
        StretchTypeEnum
      • setStyle

        public void setStyle​(JRStyle style)
      • setStyleNameReference

        public void setStyleNameReference​(java.lang.String styleName)
        Set the name of the external style to be used for this element.

        An external style is only effective when there is no internal style set for this element, i.e. getStyle() returns null The external style will be resolved at fill time from the templates used in the report.

        Parameters:
        styleName - the name of the external style
        See Also:
        JRBaseElement.getStyleNameReference()
      • setStyleExpression

        public void setStyleExpression​(JRExpression expression)
        Sets the style expression. This expression must always return a String value representing the name of the style.
      • addPropertyExpression

        public void addPropertyExpression​(JRPropertyExpression propertyExpression)
        Add a dynamic/expression-based property.
        Parameters:
        propertyExpression - the property to add
        See Also:
        getPropertyExpressions()
      • removePropertyExpression

        public JRPropertyExpression removePropertyExpression​(java.lang.String name)
        Remove a property expression.
        Parameters:
        name - the name of the property to remove
        Returns:
        the removed property expression (if found)