## org.jfree.chart.labels
Class StandardXYItemLabelGenerator

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

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, XYItemLabelGenerator, org.jfree.util.PublicCloneable

    public class StandardXYItemLabelGenerator

extends AbstractXYItemLabelGenerator
implements XYItemLabelGenerator, java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable

A standard item label generator for plots that use data from an `XYDataset`.

See Also:
  Serialized Form

Field Summary
`static java.lang.String` `DEFAULT_ITEM_LABEL_FORMAT` The default item label format.

Constructor Summary
`StandardXYItemLabelGenerator()` Creates an item label generator using default number formatters.
`StandardXYItemLabelGenerator(java.lang.String formatString, java.text.DateFormat xFormat, java.text.DateFormat yFormat)` Creates a label generator using the specified date formatters.
`StandardXYItemLabelGenerator(java.lang.String formatString, java.text.DateFormat xFormat, java.text.NumberFormat yFormat)` Creates an item label generator using the specified formatters.
`StandardXYItemLabelGenerator(java.lang.String formatString, java.text.NumberFormat xFormat, java.text.DateFormat yFormat)` Creates an item label generator using the specified formatters (a number formatter for the x-values and a date formatter for the y-values).
`StandardXYItemLabelGenerator(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.
`boolean` `equals(java.lang.Object obj)` Tests this object for equality with an arbitrary object.
`java.lang.String` `generateLabel(XYDataset dataset, int series, int item)` Generates the item label text for an item in a dataset.

Methods inherited from class org.jfree.chart.labels.AbstractXYItemLabelGenerator
`createItemArray, generateLabelString, getFormatString, getXDateFormat, getXFormat, getYDateFormat, getYFormat, hashCode`

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

Field Detail

### DEFAULT_ITEM_LABEL_FORMAT

    public static final java.lang.String DEFAULT_ITEM_LABEL_FORMAT

  The default item label format.

  See Also:
    Constant Field Values

Constructor Detail

### StandardXYItemLabelGenerator

    public StandardXYItemLabelGenerator()

  Creates an item label generator using default number formatters.

### StandardXYItemLabelGenerator

    public StandardXYItemLabelGenerator(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).

### StandardXYItemLabelGenerator

    public StandardXYItemLabelGenerator(java.lang.String formatString,
                                        java.text.DateFormat xFormat,
                                        java.text.NumberFormat yFormat)

  Creates an item label generator using the specified 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).

### StandardXYItemLabelGenerator

    public StandardXYItemLabelGenerator(java.lang.String formatString,
                                        java.text.NumberFormat xFormat,
                                        java.text.DateFormat yFormat)

  Creates an item label generator using the specified formatters (a number formatter for the x-values and a date formatter for the y-values).

  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).
  Since:
    1.0.4

### StandardXYItemLabelGenerator

    public StandardXYItemLabelGenerator(java.lang.String formatString,
                                        java.text.DateFormat xFormat,
                                        java.text.DateFormat yFormat)

  Creates a label generator using the specified date formatters.

  Parameters:
    `formatString` - the 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).

Method Detail

### generateLabel

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

  Generates the item label text for an item in a dataset.

  Specified by:
    `generateLabel` in interface `XYItemLabelGenerator`
  Parameters:
    `dataset` - the dataset (`null` not permitted).
    `series` - the series index (zero-based).
    `item` - the item index (zero-based).
  Returns:
    The label text (possibly `null`).

### clone

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

  Returns an independent copy of the generator.

  Specified by:
    `clone` in interface `org.jfree.util.PublicCloneable`
  Overrides:
    `clone` in class `AbstractXYItemLabelGenerator`
  Returns:
    A clone.
  Throws:
    `java.lang.CloneNotSupportedException` - if cloning is not supported.

### equals

    public boolean equals(java.lang.Object obj)

  Tests this object for equality with an arbitrary object.

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