org.jfree.chart.labels
Class SymbolicXYItemLabelGenerator

java.lang.Object
  extended byorg.jfree.chart.labels.SymbolicXYItemLabelGenerator
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, XYLabelGenerator, XYToolTipGenerator

public class SymbolicXYItemLabelGenerator
extends java.lang.Object
implements XYLabelGenerator, XYToolTipGenerator, java.lang.Cloneable, java.io.Serializable

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

Author:
Anthony Boulestreau
See Also:
Serialized Form

Constructor Summary
SymbolicXYItemLabelGenerator()
           
 
Method Summary
 java.lang.Object clone()
          Returns an independent copy of the generator.
 boolean equals(java.lang.Object o)
          Tests if this object is equal to another.
 java.lang.String generateLabel(XYDataset dataset, int series, int category)
          Generates a label for the specified item.
 java.lang.String generateToolTip(XYDataset data, int series, int item)
          Generates a tool tip text item for a particular item within a series.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SymbolicXYItemLabelGenerator

public SymbolicXYItemLabelGenerator()
Method Detail

generateToolTip

public java.lang.String generateToolTip(XYDataset data,
                                        int series,
                                        int item)
Generates a tool tip text item for a particular item within a series.

Specified by:
generateToolTip in interface XYToolTipGenerator
Parameters:
data - the dataset.
series - the series number (zero-based index).
item - the item number (zero-based index).
Returns:
The tool tip text (possibly null).

generateLabel

public java.lang.String generateLabel(XYDataset dataset,
                                      int series,
                                      int category)
Generates a label for the specified item. The label is typically a formatted version of the data value, but any text can be used.

Specified by:
generateLabel in interface XYLabelGenerator
Parameters:
dataset - the dataset (null not permitted).
series - the series index (zero-based).
category - the category index (zero-based).
Returns:
the label (possibly null).

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns an independent copy of the generator.

Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException - if cloning is not supported.

equals

public boolean equals(java.lang.Object o)
Tests if this object is equal to another.

Parameters:
o - the other object.
Returns:
A boolean.