public class AbstractXYItemLabelGenerator
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
formatString
The item label format string.
|
private java.lang.String |
nullYString
The string used to represent 'null' for the y-value.
|
private static long |
serialVersionUID
For serialization.
|
private java.text.DateFormat |
xDateFormat
A date formatter for the x value.
|
private java.text.NumberFormat |
xFormat
A number formatter for the x value.
|
private java.text.DateFormat |
yDateFormat
A date formatter for the y value.
|
private java.text.NumberFormat |
yFormat
A formatter for the y value.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractXYItemLabelGenerator()
Creates an item label generator using default number formatters.
|
protected |
AbstractXYItemLabelGenerator(java.lang.String formatString,
java.text.DateFormat xFormat,
java.text.DateFormat yFormat)
Creates an item label generator using the specified number formatters.
|
protected |
AbstractXYItemLabelGenerator(java.lang.String formatString,
java.text.DateFormat xFormat,
java.text.NumberFormat yFormat)
Creates an item label generator using the specified number formatters.
|
protected |
AbstractXYItemLabelGenerator(java.lang.String formatString,
java.text.NumberFormat xFormat,
java.text.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).
|
protected |
AbstractXYItemLabelGenerator(java.lang.String formatString,
java.text.NumberFormat xFormat,
java.text.NumberFormat yFormat)
Creates an item label generator using the specified number formatters.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns an independent copy of the generator.
|
protected java.lang.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(java.lang.Object obj)
Tests this object for equality with an arbitrary object.
|
java.lang.String |
generateLabelString(XYDataset dataset,
int series,
int item)
Generates a label string for an item in the dataset.
|
java.lang.String |
getFormatString()
Returns the format string (this controls the overall structure of the
label).
|
java.lang.String |
getNullYString()
Returns the string representing a null value.
|
java.text.DateFormat |
getXDateFormat()
Returns the date formatter for the x-values.
|
java.text.NumberFormat |
getXFormat()
Returns the number formatter for the x-values.
|
java.text.DateFormat |
getYDateFormat()
Returns the date formatter for the y-values.
|
java.text.NumberFormat |
getYFormat()
Returns the number formatter for the y-values.
|
int |
hashCode()
Returns a hash code for this instance.
|
private static final long serialVersionUID
private java.lang.String formatString
private java.text.NumberFormat xFormat
private java.text.DateFormat xDateFormat
private java.text.NumberFormat yFormat
private java.text.DateFormat yDateFormat
private java.lang.String nullYString
protected AbstractXYItemLabelGenerator()
protected AbstractXYItemLabelGenerator(java.lang.String formatString,
java.text.NumberFormat xFormat,
java.text.NumberFormat yFormat)
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).protected AbstractXYItemLabelGenerator(java.lang.String formatString,
java.text.DateFormat xFormat,
java.text.NumberFormat yFormat)
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).protected AbstractXYItemLabelGenerator(java.lang.String formatString,
java.text.NumberFormat xFormat,
java.text.DateFormat yFormat)
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).protected AbstractXYItemLabelGenerator(java.lang.String formatString,
java.text.DateFormat xFormat,
java.text.DateFormat yFormat)
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).public java.lang.String getFormatString()
null).public java.text.NumberFormat getXFormat()
null).public java.text.DateFormat getXDateFormat()
null).public java.text.NumberFormat getYFormat()
null).public java.text.DateFormat getYDateFormat()
null).public java.lang.String generateLabelString(XYDataset dataset, int series, int item)
dataset - the dataset (null not permitted).series - the series (zero-based index).item - the item (zero-based index).null).public java.lang.String getNullYString()
protected java.lang.Object[] createItemArray(XYDataset dataset, int series, int item)
MessageFormat class for creating labels.dataset - the dataset (null not permitted).series - the series (zero-based index).item - the item (zero-based index).String objects (never null).public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the other object (null permitted).public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - if cloning is not supported.