Package org.jfree.chart.labels
Class StandardXYToolTipGenerator
java.lang.Object
org.jfree.chart.labels.AbstractXYItemLabelGenerator
org.jfree.chart.labels.StandardXYToolTipGenerator
- All Implemented Interfaces:
Serializable
,Cloneable
,XYToolTipGenerator
,PublicCloneable
- Direct Known Subclasses:
BoxAndWhiskerXYToolTipGenerator
,StandardXYZToolTipGenerator
public class StandardXYToolTipGenerator
extends AbstractXYItemLabelGenerator
implements XYToolTipGenerator, Cloneable, PublicCloneable, Serializable
A standard tool tip generator for use with an
XYItemRenderer
.- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a tool tip generator using default number formatters.StandardXYToolTipGenerator
(String formatString, DateFormat xFormat, DateFormat yFormat) Creates a tool tip generator using the specified date formatters.StandardXYToolTipGenerator
(String formatString, DateFormat xFormat, NumberFormat yFormat) Creates a tool tip generator using the specified number formatters.StandardXYToolTipGenerator
(String formatString, NumberFormat xFormat, DateFormat yFormat) Creates a tool tip generator using the specified formatters (a number formatter for the x-values and a date formatter for the y-values).StandardXYToolTipGenerator
(String formatString, NumberFormat xFormat, NumberFormat yFormat) Creates a tool tip generator using the specified number formatters. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns an independent copy of the generator.boolean
Tests this object for equality with an arbitrary object.generateToolTip
(XYDataset dataset, int series, int item) Generates the tool tip text for an item in a dataset.static StandardXYToolTipGenerator
Returns a tool tip generator that formats the x-values as dates and the y-values as numbers.Methods inherited from class org.jfree.chart.labels.AbstractXYItemLabelGenerator
createItemArray, generateLabelString, getFormatString, getNullYString, getXDateFormat, getXFormat, getYDateFormat, getYFormat, hashCode
-
Field Details
-
DEFAULT_TOOL_TIP_FORMAT
The default tooltip format.- See Also:
-
-
Constructor Details
-
StandardXYToolTipGenerator
public StandardXYToolTipGenerator()Creates a tool tip generator using default number formatters. -
StandardXYToolTipGenerator
Creates a tool tip generator using the specified number formatters.- Parameters:
formatString
- the item label format string (null
not permitted).xFormat
- the format object for the x values (null
not permitted).yFormat
- the format object for the y values (null
not permitted).
-
StandardXYToolTipGenerator
Creates a tool tip generator using the specified number formatters.- Parameters:
formatString
- the label format string (null
not permitted).xFormat
- the format object for the x values (null
not permitted).yFormat
- the format object for the y values (null
not permitted).
-
StandardXYToolTipGenerator
Creates a tool tip generator using the specified formatters (a number formatter for the x-values and a date formatter for the y-values).- Parameters:
formatString
- the item label format string (null
not permitted).xFormat
- the format object for the x values (null
permitted).yFormat
- the format object for the y values (null
not permitted).
-
StandardXYToolTipGenerator
Creates a tool tip generator using the specified date formatters.- Parameters:
formatString
- the label format string (null
not permitted).xFormat
- the format object for the x values (null
not permitted).yFormat
- the format object for the y values (null
not permitted).
-
-
Method Details
-
getTimeSeriesInstance
Returns a tool tip generator that formats the x-values as dates and the y-values as numbers.- Returns:
- A tool tip generator (never
null
).
-
generateToolTip
Generates the tool tip text for an item in a dataset.- Specified by:
generateToolTip
in interfaceXYToolTipGenerator
- Parameters:
dataset
- the dataset (null
not permitted).series
- the series index (zero-based).item
- the item index (zero-based).- Returns:
- The tooltip text (possibly
null
).
-
equals
Tests this object for equality with an arbitrary object.- Overrides:
equals
in classAbstractXYItemLabelGenerator
- Parameters:
obj
- the other object (null
permitted).- Returns:
- A boolean.
-
clone
Returns an independent copy of the generator.- Specified by:
clone
in interfacePublicCloneable
- Overrides:
clone
in classAbstractXYItemLabelGenerator
- Returns:
- A clone.
- Throws:
CloneNotSupportedException
- if cloning is not supported.
-