org.jfree.chart.tooltips
Class IntervalCategoryToolTipGenerator

java.lang.Object
  extended byorg.jfree.chart.tooltips.IntervalCategoryToolTipGenerator
All Implemented Interfaces:
CategoryToolTipGenerator, java.io.Serializable, ToolTipGenerator

public class IntervalCategoryToolTipGenerator
extends java.lang.Object
implements CategoryToolTipGenerator, java.io.Serializable

A tooltip generator for plots that use data from an IntervalCategoryDataset.

Author:
David Gilbert
See Also:
Serialized Form

Constructor Summary
IntervalCategoryToolTipGenerator()
          Creates a new tool tip generator with a default number formatter.
IntervalCategoryToolTipGenerator(java.text.DateFormat formatter)
          Creates a tool tip generator with the specified date formatter.
IntervalCategoryToolTipGenerator(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(CategoryDataset data, int series, int 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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntervalCategoryToolTipGenerator

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


IntervalCategoryToolTipGenerator

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

Parameters:
formatter - the number formatter.

IntervalCategoryToolTipGenerator

public IntervalCategoryToolTipGenerator(java.text.DateFormat formatter)
Creates a tool tip generator with the specified date formatter.

Parameters:
formatter - the date formatter.
Method Detail

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,
                                        int 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 index (zero-based).
category - the category index (zero-based).
Returns:
the tooltip text or null if value is null.

equals

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

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