Class JRBaseItemLabel

java.lang.Object
net.sf.jasperreports.charts.base.JRBaseItemLabel
All Implemented Interfaces:
Serializable, Cloneable, JRItemLabel, JRCloneable
Direct Known Subclasses:
JRDesignItemLabel

public class JRBaseItemLabel extends Object implements JRItemLabel, 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:
  • Field Details

    • chart

      protected JRChart chart
    • color

      protected Color color
      The item label text color.
    • backgroundColor

      protected Color backgroundColor
      The item label background color.
    • font

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

    • 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, ChartsBaseObjectFactory 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 Details

    • getChart

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

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

      public 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 Object clone()
      Specified by:
      clone in interface JRCloneable
      Overrides:
      clone in class 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