Class JRBaseElement

    • Field Detail

      • PROPERTY_PRINT_WHEN_DETAIL_OVERFLOWS

        public static final String PROPERTY_PRINT_WHEN_DETAIL_OVERFLOWS
        See Also:
        Constant Field Values
      • uuid

        protected UUID uuid
      • isPrintRepeatedValues

        protected boolean isPrintRepeatedValues
      • x

        protected int x
      • y

        protected int y
      • width

        protected int width
      • height

        protected int height
      • isRemoveLineWhenBlank

        protected boolean isRemoveLineWhenBlank
      • isPrintInFirstWholeBand

        protected boolean isPrintInFirstWholeBand
      • isPrintWhenDetailOverflows

        protected boolean isPrintWhenDetailOverflows
      • forecolor

        protected Color forecolor
      • backcolor

        protected Color backcolor
      • printWhenExpression

        protected JRExpression printWhenExpression
      • printWhenGroupChanges

        protected String printWhenGroupChanges
      • parentStyle

        protected JRStyle parentStyle
      • parentStyleNameReference

        protected String parentStyleNameReference
    • Constructor Detail

      • JRBaseElement

        protected JRBaseElement​(JRElement element,
                                JRBaseObjectFactory factory)
        Initializes basic properties of the element.
        Parameters:
        element - an element whose properties are copied to this element. Usually it is a JRDesignElement that must be transformed into an JRBaseElement at compile time.
        factory - a factory used in the compile process
    • Method Detail

      • getBaseStyle

        protected JRStyle getBaseStyle()
      • setUUID

        public void setUUID​(UUID uuid)
      • setPositionType

        public void setPositionType​(PositionTypeEnum positionType)
        Description copied from interface: JRElement
        Sets the position type for the element.
        Specified by:
        setPositionType in interface JRElement
        Parameters:
        positionType - the position type
      • setStretchType

        public void setStretchType​(StretchTypeEnum stretchType)
        Description copied from interface: JRElement
        Specifies how the engine should treat a missing image.
        Specified by:
        setStretchType in interface JRElement
        Parameters:
        stretchType - a value representing one of the stretch type constants in StretchTypeEnum
      • setPrintRepeatedValues

        public void setPrintRepeatedValues​(boolean isPrintRepeatedValues)
        Specified by:
        setPrintRepeatedValues in interface JRElement
      • getMode

        public ModeEnum getMode()
        Description copied from interface: JRCommonElement
        Returns the element transparency mode. The default value depends on the type of the report element. Graphic elements like rectangles and lines are opaque by default, but the images are transparent. Both static texts and text fields are transparent by default, and so are the subreport elements.
        Specified by:
        getMode in interface JRCommonElement
      • getX

        public int getX()
        Description copied from interface: JRElement
        Gets the the section relative horizontal offset of the element top left corner.
        Specified by:
        getX in interface JRElement
      • setX

        public void setX​(int x)
        Description copied from interface: JRElement
        Sets the the section relative horizontal offset of the element top left corner.
        Specified by:
        setX in interface JRElement
      • getY

        public int getY()
        Description copied from interface: JRElement
        Gets the the section relative vertical offset of the element top left corner.
        Specified by:
        getY in interface JRElement
      • setWidth

        public void setWidth​(int width)
        Specified by:
        setWidth in interface JRElement
      • isRemoveLineWhenBlank

        public boolean isRemoveLineWhenBlank()
        Description copied from interface: JRElement
        Returns true if the remaining blank space appearing when the value is not printed will be removed. Under certain circumstances (the element has an empty string as its value or contains a repeated value that is supressed) the space reserved for the current element remains empty. If this method returns true, it means the engine will try to suppress the blank line, but will only succeed if no other elements occupy the same vertical space.
        Specified by:
        isRemoveLineWhenBlank in interface JRElement
      • setRemoveLineWhenBlank

        public void setRemoveLineWhenBlank​(boolean isRemoveLine)
        Description copied from interface: JRElement
        Specifies whether the remaining blank space appearing when the value is not printed will be removed. Under certain circumstances (the element has an empty string as its value or contains a repeated value that is supressed) the space reserved for the current element remains empty. If the parameter is set to true, it means the engine will try to suppress the blank line, but will only succeed if no other elements occupy the same vertical space.
        Specified by:
        setRemoveLineWhenBlank in interface JRElement
      • isPrintInFirstWholeBand

        public boolean isPrintInFirstWholeBand()
        Description copied from interface: JRElement
        Returns true if an element with a printRepeatedValues attribute set to true will be redisplayed for every new page or column that is not an overflow from a previous page or column.
        Specified by:
        isPrintInFirstWholeBand in interface JRElement
        See Also:
        JRElement.isPrintRepeatedValues()
      • setPrintInFirstWholeBand

        public void setPrintInFirstWholeBand​(boolean isPrint)
        Description copied from interface: JRElement
        Specifies whether an element with a printRepeatedValues attribute set to true should be redisplayed for every new page or column that is not an overflow from a previous page or column.
        Specified by:
        setPrintInFirstWholeBand in interface JRElement
        See Also:
        JRElement.isPrintRepeatedValues()
      • isPrintWhenDetailOverflows

        public boolean isPrintWhenDetailOverflows()
        Description copied from interface: JRElement
        If this is set to true, the element will be reprinted on the next page if the band does not fit in the current page. Actually if there is at least one element with this attribute, the band is redisplayed from the beginning, except those elements that fitted in the current page and have isPrintWhenDetailOverflow set to false.
        Specified by:
        isPrintWhenDetailOverflows in interface JRElement
      • setPrintWhenDetailOverflows

        public void setPrintWhenDetailOverflows​(boolean isPrint)
        Description copied from interface: JRElement
        If this is set to true, the element will be reprinted on the next page if the band does not fit in the current page. Actually if there is at least one element with this attribute, the band is redisplayed from the beginning, except those elements that fitted in the current page and have isPrintWhenDetailOverflow set to false.
        Specified by:
        setPrintWhenDetailOverflows in interface JRElement
      • getPrintWhenExpression

        public JRExpression getPrintWhenExpression()
        Description copied from interface: JRElement
        Gets the expression that is evaluated in order to decide if the element should be displayed. This expression always returns a boolean value.
        Specified by:
        getPrintWhenExpression in interface JRElement
      • getElementGroup

        public JRElementGroup getElementGroup()
        Description copied from interface: JRElement
        Indicates 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.
        Specified by:
        getElementGroup in interface JRElement
        See Also:
        StretchTypeEnum
      • getStyleNameReference

        public String getStyleNameReference()
        Description copied from interface: JRStyleContainer
        Returns the name of an external style which is to be used by this object.

        External styles are defined in templates and are resolved at fill time. This attribute is only effective if no direct style (as returned by getStyle() is specified for this object.

        Specified by:
        getStyleNameReference in interface JRStyleContainer
        Returns:
        the name of an external style
      • hasProperties

        public boolean hasProperties()
        Description copied from interface: JRPropertiesHolder
        Checks whether the object has any properties.
        Specified by:
        hasProperties in interface JRPropertiesHolder
        Returns:
        whether the object has any properties
      • getPropertyExpressions

        public JRPropertyExpression[] getPropertyExpressions()
        Description copied from interface: JRElement
        Returns the list of dynamic/expression-based properties for this report element.
        Specified by:
        getPropertyExpressions in interface JRElement
        Returns:
        an array containing the expression-based properties of this report element