java.lang.Object
org.jfree.chart.labels.AbstractXYItemLabelGenerator
org.jfree.chart.labels.StandardXYItemLabelGenerator
- All Implemented Interfaces:
Serializable
,Cloneable
,XYItemLabelGenerator
,PublicCloneable
public class StandardXYItemLabelGenerator
extends AbstractXYItemLabelGenerator
implements XYItemLabelGenerator, Cloneable, PublicCloneable, Serializable
A standard item label generator for plots that use data from an
XYDataset
.- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates an item label generator using default number formatters.StandardXYItemLabelGenerator
(String formatString) Creates an item label generator using the specified number formatters.StandardXYItemLabelGenerator
(String formatString, DateFormat xFormat, DateFormat yFormat) Creates a label generator using the specified date formatters.StandardXYItemLabelGenerator
(String formatString, DateFormat xFormat, NumberFormat yFormat) Creates an item label generator using the specified formatters.StandardXYItemLabelGenerator
(String formatString, NumberFormat xFormat, DateFormat yFormat) Creates an item label generator using the specified formatters (a number formatter for the x-values and a date formatter for the y-values).StandardXYItemLabelGenerator
(String formatString, NumberFormat xFormat, NumberFormat yFormat) Creates an item label generator using the specified number formatters. -
Method Summary
Methods inherited from class org.jfree.chart.labels.AbstractXYItemLabelGenerator
createItemArray, generateLabelString, getFormatString, getNullYString, getXDateFormat, getXFormat, getYDateFormat, getYFormat, hashCode
-
Field Details
-
DEFAULT_ITEM_LABEL_FORMAT
The default item label format.- See Also:
-
-
Constructor Details
-
StandardXYItemLabelGenerator
public StandardXYItemLabelGenerator()Creates an item label generator using default number formatters. -
StandardXYItemLabelGenerator
Creates an item label generator using the specified number formatters.- Parameters:
formatString
- the item label format string (null
not permitted).
-
StandardXYItemLabelGenerator
public StandardXYItemLabelGenerator(String formatString, NumberFormat xFormat, NumberFormat yFormat) Creates an item label 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).
-
StandardXYItemLabelGenerator
Creates an item label 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).
-
StandardXYItemLabelGenerator
Creates an item label 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).
-
StandardXYItemLabelGenerator
Creates a label 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
-
generateLabel
Generates the item label text for an item in a dataset.- Specified by:
generateLabel
in interfaceXYItemLabelGenerator
- Parameters:
dataset
- the dataset (null
not permitted).series
- the series index (zero-based).item
- the item index (zero-based).- Returns:
- The label 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.
-