Class JRBaseItemLabel

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, JRItemLabel, JRCloneable
    Direct Known Subclasses:
    JRDesignItemLabel

    public class JRBaseItemLabel
    extends java.lang.Object
    implements JRItemLabel, java.io.Serializable
    An immutable representation of the formatting options for showing the item labels in a category plot.
    Author:
    Sanda Zaharia (shertage@users.sourceforge.net)
    See Also:
    Serialized Form
    • Field Detail

      • color

        protected java.awt.Color color
        The item label text color.
      • backgroundColor

        protected java.awt.Color backgroundColor
        The item label background color.
      • font

        protected JRFont font
        The item label text font.
    • Constructor Detail

      • JRBaseItemLabel

        public JRBaseItemLabel​(JRItemLabel itemLabel,
                               JRChart chart)
        Constructs a copy of an existing item label specification.
        Parameters:
        itemLabel - the item label object to copy
        chart - the parent chart
      • JRBaseItemLabel

        public JRBaseItemLabel​(JRItemLabel itemLabel,
                               JRBaseObjectFactory factory)
        Constructs a copy of an existing item label specification and registers any expression in the new copy with the specified factory.
        Parameters:
        itemLabel - the item label object to copy
        factory - the factory object to register expressions with
    • Method Detail

      • getChart

        public JRChart getChart()
        Specified by:
        getChart in interface JRItemLabel
        Returns:
        the chart the current item label belongs to.
      • getColor

        public java.awt.Color getColor()
        Specified by:
        getColor in interface JRItemLabel
        Returns:
        the item label text color
      • getBackgroundColor

        public java.awt.Color getBackgroundColor()
        Specified by:
        getBackgroundColor in interface JRItemLabel
        Returns:
        the item label background color
      • getFont

        public JRFont getFont()
        Specified by:
        getFont in interface JRItemLabel
        Returns:
        the item label font. Allows full font customization for the item label.
      • collectExpressions

        public void collectExpressions​(JRExpressionCollector collector)
        Adds all the expression used by this plot with the specified collector. All collected expression that are also registered with a factory will be included with the report is compiled.
        Parameters:
        collector - the expression collector to use
      • clone

        public java.lang.Object clone()
        Specified by:
        clone in interface JRCloneable
        Overrides:
        clone in class java.lang.Object
      • clone

        public JRItemLabel clone​(JRChart parentChart)
        Description copied from interface: JRItemLabel
        Returns the item label formatting mask. The mask will be specified using the patterns defined in java.text.DecimalFormat.
        Specified by:
        clone in interface JRItemLabel
        Returns:
        the item label formatting mask