Class AbstractXYItemLabelGenerator

java.lang.Object
org.jfree.chart.labels.AbstractXYItemLabelGenerator
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
StandardXYLabelGenerator, StandardXYToolTipGenerator

public class AbstractXYItemLabelGenerator
extends Object
implements Cloneable, Serializable
A base class for creating item label generators.
See Also:
Serialized Form
  • Method Details

    • getFormatString

      public String getFormatString()
      Returns the format string (this controls the overall structure of the label).
      Returns:
      The format string (never null).
    • getXFormat

      public NumberFormat getXFormat()
      Returns the number formatter for the x-values.
      Returns:
      The number formatter (possibly null).
    • getXDateFormat

      public DateFormat getXDateFormat()
      Returns the date formatter for the x-values.
      Returns:
      The date formatter (possibly null).
    • getYFormat

      public NumberFormat getYFormat()
      Returns the number formatter for the y-values.
      Returns:
      the number formatter (possibly null).
    • getYDateFormat

      public DateFormat getYDateFormat()
      Returns the date formatter for the y-values.
      Returns:
      The date formatter (possibly null).
    • generateLabelString

      public 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).
    • equals

      public boolean equals​(Object obj)
      Tests this object for equality with an arbitrary object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the other object (null permitted).
      Returns:
      A boolean.
    • clone

      public Object clone() throws CloneNotSupportedException
      Returns an independent copy of the generator.
      Returns:
      A clone.
      Throws:
      CloneNotSupportedException - if cloning is not supported.