Package org.jfree.chart.labels
Class MultipleXYSeriesLabelGenerator
java.lang.Object
org.jfree.chart.labels.MultipleXYSeriesLabelGenerator
- All Implemented Interfaces:
Serializable,Cloneable,XYSeriesLabelGenerator,PublicCloneable
public class MultipleXYSeriesLabelGenerator
extends Object
implements XYSeriesLabelGenerator, Cloneable, PublicCloneable, Serializable
A series label generator for plots that use data from
an
XYDataset.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an item label generator using default number formatters.MultipleXYSeriesLabelGenerator(String format) Creates a new series label generator. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSeriesLabel(int series, String label) Adds an extra label for the specified series.voidclearSeriesLabels(int series) Clears the extra labels for the specified series.clone()Returns an independent copy of the generator.protected Object[]createItemArray(XYDataset dataset, int series) Creates the array of items that can be passed to theMessageFormatclass for creating labels.booleanTests this object for equality with an arbitrary object.generateLabel(XYDataset dataset, int series) Generates a label for the specified series.inthashCode()Returns a hash code for this instance.
-
Field Details
-
DEFAULT_LABEL_FORMAT
The default item label format.- See Also:
-
-
Constructor Details
-
MultipleXYSeriesLabelGenerator
public MultipleXYSeriesLabelGenerator()Creates an item label generator using default number formatters. -
MultipleXYSeriesLabelGenerator
Creates a new series label generator.- Parameters:
format- the format pattern (nullnot permitted).
-
-
Method Details
-
addSeriesLabel
Adds an extra label for the specified series.- Parameters:
series- the series index.label- the label.
-
clearSeriesLabels
Clears the extra labels for the specified series.- Parameters:
series- the series index.
-
generateLabel
Generates a label for the specified series. This label will be used for the chart legend.- Specified by:
generateLabelin interfaceXYSeriesLabelGenerator- Parameters:
dataset- the dataset (nullnot permitted).series- the series.- Returns:
- A series label.
-
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).- Returns:
- The items (never
null).
-
clone
Returns an independent copy of the generator.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classObject- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if cloning is not supported.
-
equals
Tests this object for equality with an arbitrary object. -
hashCode
Returns a hash code for this instance.
-