Package org.jfree.chart.labels
Class StandardXYZToolTipGenerator
java.lang.Object
org.jfree.chart.labels.AbstractXYItemLabelGenerator
org.jfree.chart.labels.StandardXYToolTipGenerator
org.jfree.chart.labels.StandardXYZToolTipGenerator
- All Implemented Interfaces:
Serializable,Cloneable,XYToolTipGenerator,XYZToolTipGenerator,PublicCloneable
public class StandardXYZToolTipGenerator
extends StandardXYToolTipGenerator
implements XYZToolTipGenerator, Serializable
A standard item label generator for use with
XYZDataset data. Each
value can be formatted as a number or as a date.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new tool tip generator using default number formatters for the x, y and z-values.StandardXYZToolTipGenerator(String formatString, DateFormat xFormat, DateFormat yFormat, DateFormat zFormat) Constructs a new tool tip generator using the specified date formatters.StandardXYZToolTipGenerator(String formatString, NumberFormat xFormat, NumberFormat yFormat, NumberFormat zFormat) Constructs a new tool tip generator using the specified number formatters. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object[]createItemArray(XYZDataset dataset, int series, int item) Creates the array of items that can be passed to theMessageFormatclass for creating labels.booleanTests this object for equality with an arbitrary object.generateLabelString(XYDataset dataset, int series, int item) Generates a label string for an item in the dataset.generateToolTip(XYZDataset dataset, int series, int item) Generates a tool tip text item for a particular item within a series.Returns the date formatter for the z-values.Returns the number formatter for the z-values.Methods inherited from class org.jfree.chart.labels.StandardXYToolTipGenerator
clone, generateToolTip, getTimeSeriesInstanceMethods inherited from class org.jfree.chart.labels.AbstractXYItemLabelGenerator
createItemArray, getFormatString, getNullYString, getXDateFormat, getXFormat, getYDateFormat, getYFormat, hashCodeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.chart.labels.XYToolTipGenerator
generateToolTip
-
Field Details
-
DEFAULT_TOOL_TIP_FORMAT
The default tooltip format.- See Also:
-
-
Constructor Details
-
StandardXYZToolTipGenerator
public StandardXYZToolTipGenerator()Creates a new tool tip generator using default number formatters for the x, y and z-values. -
StandardXYZToolTipGenerator
public StandardXYZToolTipGenerator(String formatString, NumberFormat xFormat, NumberFormat yFormat, NumberFormat zFormat) Constructs a new tool tip generator using the specified number formatters.- Parameters:
formatString- the format string.xFormat- the format object for the x values (nullnot permitted).yFormat- the format object for the y values (nullnot permitted).zFormat- the format object for the z values (nullnot permitted).
-
StandardXYZToolTipGenerator
public StandardXYZToolTipGenerator(String formatString, DateFormat xFormat, DateFormat yFormat, DateFormat zFormat) Constructs a new tool tip generator using the specified date formatters.- Parameters:
formatString- the format string.xFormat- the format object for the x values (nullnot permitted).yFormat- the format object for the y values (nullnot permitted).zFormat- the format object for the z values (nullnot permitted).
-
-
Method Details
-
getZFormat
Returns the number formatter for the z-values.- Returns:
- The number formatter (possibly
null).
-
getZDateFormat
Returns the date formatter for the z-values.- Returns:
- The date formatter (possibly
null).
-
generateToolTip
Generates a tool tip text item for a particular item within a series.- Specified by:
generateToolTipin interfaceXYZToolTipGenerator- Parameters:
dataset- the dataset (nullnot permitted).series- the series index (zero-based).item- the item index (zero-based).- Returns:
- The tooltip text (possibly
null).
-
generateLabelString
Generates a label string for an item in the dataset.- Overrides:
generateLabelStringin classAbstractXYItemLabelGenerator- Parameters:
dataset- the dataset (nullnot permitted).series- the series (zero-based index).item- the item (zero-based index).- Returns:
- The label (possibly
null).
-
createItemArray
Creates the array of items that can be passed to theMessageFormatclass for creating labels.- Parameters:
dataset- the dataset (nullnot permitted).series- the series (zero-based index).item- the item (zero-based index).- Returns:
- The items (never
null).
-
equals
Tests this object for equality with an arbitrary object.- Overrides:
equalsin classStandardXYToolTipGenerator- Parameters:
obj- the other object (nullpermitted).- Returns:
- A boolean.
-