org.jfree.chart.labels
Class AbstractXYItemLabelGenerator
java.lang.Object
org.jfree.chart.labels.AbstractXYItemLabelGenerator
- Cloneable, Serializable
extends java.lang.Object
implements Cloneable, Serializable
A base class for creating item label generators.
AbstractXYItemLabelGenerator() - Creates an item label generator using default number formatters.
|
AbstractXYItemLabelGenerator(String formatString, DateFormat xFormat, DateFormat yFormat) - Creates an item label generator using the specified number formatters.
|
AbstractXYItemLabelGenerator(String formatString, DateFormat xFormat, NumberFormat yFormat) - Creates an item label generator using the specified number formatters.
|
AbstractXYItemLabelGenerator(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).
|
AbstractXYItemLabelGenerator(String formatString, NumberFormat xFormat, NumberFormat yFormat) - Creates an item label generator using the specified number formatters.
|
Object | clone() - 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 the
MessageFormat class for creating labels.
|
boolean | equals(Object obj) - Tests this object for equality with an arbitrary object.
|
String | generateLabelString(XYDataset dataset, int series, int item) - Generates a label string for an item in the dataset.
|
String | getFormatString() - Returns the format string (this controls the overall structure of the
label).
|
DateFormat | getXDateFormat() - Returns the date formatter for the x-values.
|
NumberFormat | getXFormat() - Returns the number formatter for the x-values.
|
DateFormat | getYDateFormat() - Returns the date formatter for the y-values.
|
NumberFormat | getYFormat() - Returns the number formatter for the y-values.
|
AbstractXYItemLabelGenerator
protected AbstractXYItemLabelGenerator(String formatString,
DateFormat xFormat,
DateFormat yFormat)
Creates an item label generator using the specified number formatters.
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).
AbstractXYItemLabelGenerator
protected AbstractXYItemLabelGenerator(String formatString,
DateFormat xFormat,
NumberFormat yFormat)
Creates an item label generator using the specified number formatters.
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).
AbstractXYItemLabelGenerator
protected AbstractXYItemLabelGenerator(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).
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).
AbstractXYItemLabelGenerator
protected AbstractXYItemLabelGenerator(String formatString,
NumberFormat xFormat,
NumberFormat yFormat)
Creates an item label generator using the specified number formatters.
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).
clone
public Object clone()
throws CloneNotSupportedException
Returns an independent copy of the generator.
createItemArray
protected Object[] createItemArray(XYDataset dataset,
int series,
int item)
Creates the array of items that can be passed to the
MessageFormat
class for creating labels.
dataset
- the dataset (null
not permitted).series
- the series (zero-based index).item
- the item (zero-based index).
- An array of three items from the dataset formatted as
String
objects (never null
).
equals
public boolean equals(Object obj)
Tests this object for equality with an arbitrary object.
obj
- the other object (null
permitted).
generateLabelString
public String generateLabelString(XYDataset dataset,
int series,
int item)
Generates a label string for an item in the dataset.
dataset
- the dataset (null
not permitted).series
- the series (zero-based index).item
- the item (zero-based index).
- The label (possibly
null
).
getFormatString
public String getFormatString()
Returns the format string (this controls the overall structure of the
label).
- The format string (never
null
).
getXDateFormat
public DateFormat getXDateFormat()
Returns the date formatter for the x-values.
- The date formatter (possibly
null
).
getXFormat
public NumberFormat getXFormat()
Returns the number formatter for the x-values.
- The number formatter (possibly
null
).
getYDateFormat
public DateFormat getYDateFormat()
Returns the date formatter for the y-values.
- The date formatter (possibly
null
).
getYFormat
public NumberFormat getYFormat()
Returns the number formatter for the y-values.
- The number formatter (possibly
null
).