org.jfree.chart.tooltips
Class StandardPieToolTipGenerator

java.lang.Object
  |
  +--org.jfree.chart.tooltips.StandardPieToolTipGenerator
All Implemented Interfaces:
PieToolTipGenerator, java.io.Serializable, ToolTipGenerator

public class StandardPieToolTipGenerator
extends java.lang.Object
implements PieToolTipGenerator, java.io.Serializable

A standard tool tip generator for plots that use data from a PieDataset.

Author:
David Gilbert
See Also:
Serialized Form

Constructor Summary
StandardPieToolTipGenerator()
          Creates a tool tip generator with a default number formatter.
StandardPieToolTipGenerator(java.text.NumberFormat formatter)
          Creates a tool tip generator with the specified number formatter.
 
Method Summary
 boolean equals(java.lang.Object o)
          Tests if this object is equal to another.
 java.lang.String generateToolTip(PieDataset data, java.lang.Comparable key, int pieIndex)
          Generates a tool tip text item for one section in a pie chart.
 java.text.NumberFormat getNumberFormat()
          Returns the number formatter.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardPieToolTipGenerator

public StandardPieToolTipGenerator()
Creates a tool tip generator with a default number formatter.


StandardPieToolTipGenerator

public StandardPieToolTipGenerator(java.text.NumberFormat formatter)
Creates a tool tip generator with the specified number formatter.

Parameters:
formatter - the number formatter.
Method Detail

getNumberFormat

public java.text.NumberFormat getNumberFormat()
Returns the number formatter.

Returns:
the number formatter.

generateToolTip

public java.lang.String generateToolTip(PieDataset data,
                                        java.lang.Comparable key,
                                        int pieIndex)
Generates a tool tip text item for one section in a pie chart.

Specified by:
generateToolTip in interface PieToolTipGenerator
Parameters:
data - the dataset.
key - the item key.
pieIndex - the pie index (ignored).
Returns:
The tool tip text (possibly null).

equals

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

Overrides:
equals in class java.lang.Object
Parameters:
o - the other object.
Returns:
A boolean.