public class StandardXYSeriesLabelGenerator extends java.lang.Object implements XYSeriesLabelGenerator, java.lang.Cloneable, PublicCloneable, java.io.Serializable
XYDataset.
PublicCloneable by mistake but we retain
this for the sake of backward compatibility.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_LABEL_FORMAT
The default item label format.
|
| Constructor and Description |
|---|
StandardXYSeriesLabelGenerator()
Creates a default series label generator (uses
DEFAULT_LABEL_FORMAT). |
StandardXYSeriesLabelGenerator(java.lang.String format)
Creates a new series label generator.
|
| 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)
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 |
generateLabel(XYDataset dataset,
int series)
Generates a label for the specified series.
|
int |
hashCode()
Returns a hash code for this instance.
|
public static final java.lang.String DEFAULT_LABEL_FORMAT
public StandardXYSeriesLabelGenerator()
DEFAULT_LABEL_FORMAT).public StandardXYSeriesLabelGenerator(java.lang.String format)
format - the format pattern (null not permitted).public java.lang.String generateLabel(XYDataset dataset, int series)
generateLabel in interface XYSeriesLabelGeneratordataset - the dataset (null not permitted).series - the series.protected java.lang.Object[] createItemArray(XYDataset dataset, int series)
MessageFormat class for creating labels.dataset - the dataset (null not permitted).series - the series (zero-based index).null).public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface PublicCloneableclone in class java.lang.Objectjava.lang.CloneNotSupportedException - if cloning is not supported.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.Object