Package org.jfree.chart.labels
Class IntervalXYToolTipGenerator
java.lang.Object
org.jfree.chart.labels.AbstractXYItemLabelGenerator
org.jfree.chart.labels.IntervalXYToolTipGenerator
- All Implemented Interfaces:
Serializable
,Cloneable
,XYToolTipGenerator
,PublicCloneable
public class IntervalXYToolTipGenerator
extends AbstractXYItemLabelGenerator
implements XYToolTipGenerator, Cloneable, PublicCloneable, Serializable
A tooltip generator for datasets that implement the
IntervalXYDataset
interface.- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a new tooltip generator using default number formatters.IntervalXYToolTipGenerator
(String formatString, DateFormat xFormat, DateFormat yFormat) Creates a new tool tip generator using the specified date formatters.IntervalXYToolTipGenerator
(String formatString, DateFormat xFormat, NumberFormat yFormat) Creates a new tool tip generator using the specified formatters.IntervalXYToolTipGenerator
(String formatString, NumberFormat xFormat, DateFormat yFormat) Creates a new tool tip generator using the specified formatters (a number formatter for the x-values and a date formatter for the y-values).IntervalXYToolTipGenerator
(String formatString, NumberFormat xFormat, NumberFormat yFormat) Creates a new tooltip generator using the specified number formatters. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns an independent copy of the generator.protected Object[]
createItemArray
(XYDataset dataset, int series, int item) Creates the array of items that can be passed to theMessageFormat
class for creating labels.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.Methods inherited from class org.jfree.chart.labels.AbstractXYItemLabelGenerator
generateLabelString, getFormatString, getNullYString, getXDateFormat, getXFormat, getYDateFormat, getYFormat, hashCode
-
Field Details
-
DEFAULT_TOOL_TIP_FORMAT
The default item label format.- See Also:
-
-
Constructor Details
-
IntervalXYToolTipGenerator
public IntervalXYToolTipGenerator()Creates a new tooltip generator using default number formatters. -
IntervalXYToolTipGenerator
Creates a new tooltip 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).
-
IntervalXYToolTipGenerator
Creates a new tool tip generator using the specified 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).
-
IntervalXYToolTipGenerator
Creates a new 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).
-
IntervalXYToolTipGenerator
Creates a new 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
-
createItemArray
Creates the array of items that can be passed to theMessageFormat
class for creating labels.- Overrides:
createItemArray
in classAbstractXYItemLabelGenerator
- Parameters:
dataset
- the dataset (null
not permitted).series
- the series (zero-based index).item
- the item (zero-based index).- Returns:
- An array of seven items from the dataset formatted as
String
objects (nevernull
).
-
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 tool tip text (possibly
null
).
-
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.
-
equals
Tests this object for equality with an arbitrary object.- Overrides:
equals
in classAbstractXYItemLabelGenerator
- Parameters:
obj
- the other object (null
permitted).- Returns:
- A boolean.
-