Package org.jfree.chart.labels
Class CustomXYToolTipGenerator
java.lang.Object
org.jfree.chart.labels.CustomXYToolTipGenerator
- All Implemented Interfaces:
Serializable,Cloneable,XYToolTipGenerator,org.jfree.util.PublicCloneable
public class CustomXYToolTipGenerator extends Object implements XYToolTipGenerator, Cloneable, org.jfree.util.PublicCloneable, Serializable
A tool tip generator that stores custom tooltips. The dataset passed into the
generateToolTip method is ignored.
- Author:
- Richard Atkinson
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description CustomXYToolTipGenerator()Default constructor. -
Method Summary
Modifier and Type Method Description voidaddToolTipSeries(List toolTips)Adds a list of tooltips for a series.Objectclone()Returns an independent copy of the generator.booleanequals(Object o)Tests if this object is equal to another.StringgenerateToolTip(XYDataset data, int series, int item)Generates a tool tip text item for a particular item within a series.intgetListCount()Returns the number of tool tip lists stored by the renderer.intgetToolTipCount(int list)Returns the number of tool tips in a given list.StringgetToolTipText(int series, int item)Returns the tool tip text for an item.
-
Constructor Details
-
CustomXYToolTipGenerator
public CustomXYToolTipGenerator()Default constructor.
-
-
Method Details
-
getListCount
public int getListCount()Returns the number of tool tip lists stored by the renderer.- Returns:
- The list count.
-
getToolTipCount
public int getToolTipCount(int list)Returns the number of tool tips in a given list.- Parameters:
list- the list index (zero based).- Returns:
- The tooltip count.
-
getToolTipText
Returns the tool tip text for an item.- Parameters:
series- the series index.item- the item index.- Returns:
- The tool tip text.
-
addToolTipSeries
Adds a list of tooltips for a series.- Parameters:
toolTips- the list of tool tips.
-
generateToolTip
Generates a tool tip text item for a particular item within a series.- Specified by:
generateToolTipin interfaceXYToolTipGenerator- Parameters:
data- the dataset (ignored in this implementation).series- the series (zero-based index).item- the item (zero-based index).- Returns:
- the tooltip text.
-
clone
Returns an independent copy of the generator.- Specified by:
clonein interfaceorg.jfree.util.PublicCloneable- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if cloning is not supported.
-
equals
Tests if this object is equal to another.
-