net.sf.jasperreports.charts.base

## Class JRBaseItemLabel

- java.lang.Object
- - net.sf.jasperreports.charts.base.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.
  Version:
    $Id: JRBaseItemLabel.java 7088 2014-05-12 15:56:44Z lucianc $
  Author:
    sanda zaharia (shertage@users.sourceforge.net)
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.awt.Color` | `backgroundColor` The item label background color.
    `protected JRChart` | `chart`
    `protected java.awt.Color` | `color` The item label text color.
    `protected JRFont` | `font` The item label text font.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `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.
    `JRBaseItemLabel(JRItemLabel itemLabel, JRChart chart)` Constructs a copy of an existing item label specification.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()`
    `JRItemLabel` | `clone(JRChart parentChart)` Returns the item label formatting mask.
    `void` | `collectExpressions(JRExpressionCollector collector)` Adds all the expression used by this plot with the specified collector.
    `java.awt.Color` | `getBackgroundColor()`
    `JRChart` | `getChart()`
    `java.awt.Color` | `getColor()`
    `JRFont` | `getFont()`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### chart

          protected JRChart chart

    - #### 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

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com