Class JRDesignElement

    • Method Detail

      • setKey

        public void setKey​(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​(String 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​(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​(String name)
        Remove a property expression.
        Parameters:
        name - the name of the property to remove
        Returns:
        the removed property expression (if found)