## org.jfree.chart.labels
Class AbstractXYItemLabelGenerator

    java.lang.Object
      org.jfree.chart.labels.AbstractXYItemLabelGenerator

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

Direct Known Subclasses:
  StandardXYLabelGenerator, StandardXYToolTipGenerator

    public class AbstractXYItemLabelGenerator

extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

A base class for creating item label generators.

See Also:
  Serialized Form

Constructor Summary
`protected` `AbstractXYItemLabelGenerator()` Creates an item label generator using default number formatters.
`protected` `AbstractXYItemLabelGenerator(java.lang.String formatString, java.text.DateFormat xFormat, java.text.DateFormat yFormat)` Creates an item label generator using the specified number formatters.
`protected` `AbstractXYItemLabelGenerator(java.lang.String formatString, java.text.DateFormat xFormat, java.text.NumberFormat yFormat)` Creates an item label generator using the specified number formatters.
`protected` `AbstractXYItemLabelGenerator(java.lang.String formatString, java.text.NumberFormat xFormat, java.text.NumberFormat yFormat)` Creates an item label generator using the specified number formatters.

Method Summary
`java.lang.Object` `clone()` Returns an independent copy of the generator.
`protected java.lang.Object[]` `createItemArray(XYDataset dataset, int series, int item)` Creates the array of items that can be passed to the `MessageFormat` class for creating labels.
`boolean` `equals(java.lang.Object obj)` Tests this object for equality with an arbitrary object.
`java.lang.String` `generateLabelString(XYDataset dataset, int series, int item)` Generates a label string for an item in the dataset.
`java.lang.String` `getFormatString()` Returns the format string (this controls the overall structure of the label).
`java.text.DateFormat` `getXDateFormat()` Returns the date formatter for the x-values.
`java.text.NumberFormat` `getXFormat()` Returns the number formatter for the x-values.
`java.text.DateFormat` `getYDateFormat()` Returns the date formatter for the y-values.
`java.text.NumberFormat` `getYFormat()` Returns the number formatter for the y-values.

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractXYItemLabelGenerator

    protected AbstractXYItemLabelGenerator()

  Creates an item label generator using default number formatters.

### AbstractXYItemLabelGenerator

    protected AbstractXYItemLabelGenerator(java.lang.String formatString,
                                           java.text.NumberFormat xFormat,
                                           java.text.NumberFormat yFormat)

  Creates an item label generator using the specified number formatters.

  Parameters:
    `formatString` - the item label format string (`null` not permitted).
    `xFormat` - the format object for the x values (`null` not permitted).
    `yFormat` - the format object for the y values (`null` not permitted).

### AbstractXYItemLabelGenerator

    protected AbstractXYItemLabelGenerator(java.lang.String formatString,
                                           java.text.DateFormat xFormat,
                                           java.text.NumberFormat yFormat)

  Creates an item label generator using the specified number formatters.

  Parameters:
    `formatString` - the item label format string (`null` not permitted).
    `xFormat` - the format object for the x values (`null` permitted).
    `yFormat` - the format object for the y values (`null` not permitted).

### AbstractXYItemLabelGenerator

    protected AbstractXYItemLabelGenerator(java.lang.String formatString,
                                           java.text.DateFormat xFormat,
                                           java.text.DateFormat yFormat)

  Creates an item label generator using the specified number formatters.

  Parameters:
    `formatString` - the item label format string (`null` not permitted).
    `xFormat` - the format object for the x values (`null` permitted).
    `yFormat` - the format object for the y values (`null` not permitted).

Method Detail

### getFormatString

    public java.lang.String getFormatString()

  Returns the format string (this controls the overall structure of the label).

  Returns:
    The format string (never `null`).

### getXFormat

    public java.text.NumberFormat getXFormat()

  Returns the number formatter for the x-values.

  Returns:
    The number formatter (possibly `null`).

### getXDateFormat

    public java.text.DateFormat getXDateFormat()

  Returns the date formatter for the x-values.

  Returns:
    The date formatter (possibly `null`).

### getYFormat

    public java.text.NumberFormat getYFormat()

  Returns the number formatter for the y-values.

  Returns:
    the number formatter (possibly `null`).

### getYDateFormat

    public java.text.DateFormat getYDateFormat()

  Returns the date formatter for the y-values.

  Returns:
    The date formatter (possibly `null`).

### generateLabelString

    public java.lang.String generateLabelString(XYDataset dataset,
                                                int series,
                                                int item)

  Generates a label string for an item in the dataset.

  Parameters:
    `dataset` - the dataset (`null` not permitted).
    `series` - the series (zero-based index).
    `item` - the item (zero-based index).
  Returns:
    The label (possibly `null`).

### createItemArray

    protected java.lang.Object[] createItemArray(XYDataset dataset,
                                                 int series,
                                                 int item)

  Creates the array of items that can be passed to the `MessageFormat` class for creating labels.

  Parameters:
    `dataset` - the dataset (`null` not permitted).
    `series` - the series (zero-based index).
    `item` - the item (zero-based index).
  Returns:
    The items (never `null`).

### equals

    public boolean equals(java.lang.Object obj)

  Tests this object for equality with an arbitrary object.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `obj` - the other object (`null` permitted).
  Returns:
    A boolean.

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Returns an independent copy of the generator.

  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    A clone.
  Throws:
    `java.lang.CloneNotSupportedException` - if cloning is not supported.