com.jrefinery.chart.tooltips
Class StandardCategoryToolTipGenerator
java.lang.Object
|
+--com.jrefinery.chart.tooltips.StandardCategoryToolTipGenerator
- All Implemented Interfaces:
- CategoryToolTipGenerator, ToolTipGenerator
- public class StandardCategoryToolTipGenerator
- extends java.lang.Object
- implements CategoryToolTipGenerator
A standard tooltip generator for plots that use data from a CategoryDataset.
- Author:
- DG
Method Summary |
java.lang.String |
generateToolTip(CategoryDataset data,
int series,
java.lang.Object category)
Generates a tooltip text item for a particular category within a series. |
java.text.DateFormat |
getDateFormat()
Returns the date formatter. |
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 |
StandardCategoryToolTipGenerator
public StandardCategoryToolTipGenerator()
- Creates a new tool tip generator with a default number formatter.
StandardCategoryToolTipGenerator
public StandardCategoryToolTipGenerator(java.text.NumberFormat formatter)
- Creates a tool tip generator with the specified number formatter.
- Parameters:
formatter
- the number formatter.
StandardCategoryToolTipGenerator
public StandardCategoryToolTipGenerator(java.text.DateFormat formatter)
- Creates a tool tip generator with the specified date formatter.
- Parameters:
formatter
- the date formatter.
getNumberFormat
public java.text.NumberFormat getNumberFormat()
- Returns the number formatter.
- Returns:
- the number formatter.
getDateFormat
public java.text.DateFormat getDateFormat()
- Returns the date formatter.
- Returns:
- the date formatter.
generateToolTip
public java.lang.String generateToolTip(CategoryDataset data,
int series,
java.lang.Object category)
- Generates a tooltip text item for a particular category within a series.
- Specified by:
generateToolTip
in interface CategoryToolTipGenerator
- Parameters:
data
- the dataset.series
- the series number (zero-based index).category
- the category.- Returns:
- the tooltip text or
null
if value is null
.