com.jrefinery.chart.tooltips
Class StandardPieToolTipGenerator
java.lang.Object
|
+--com.jrefinery.chart.tooltips.StandardPieToolTipGenerator
- All Implemented Interfaces:
- PieToolTipGenerator, ToolTipGenerator
- public class StandardPieToolTipGenerator
- extends java.lang.Object
- implements PieToolTipGenerator
A standard tool tip generator for plots that use data from a PieDataset.
- Author:
- DG
Method Summary |
java.lang.String |
generateToolTip(PieDataset data,
java.lang.Object category)
Generates a tool tip text item for a particular category. |
java.text.NumberFormat |
getNumberFormat()
Returns the number formatter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
getNumberFormat
public java.text.NumberFormat getNumberFormat()
- Returns the number formatter.
- Returns:
- the number formatter.
generateToolTip
public java.lang.String generateToolTip(PieDataset data,
java.lang.Object category)
- Generates a tool tip text item for a particular category.
- Specified by:
generateToolTip
in interface PieToolTipGenerator
- Parameters:
data
- the dataset.category
- the category.- Returns:
- the tool tip text or
null
if value is null
.