java.lang.Object
org.jfree.chart3d.label.StandardXYZLabelGenerator
- All Implemented Interfaces:
Serializable
,XYZLabelGenerator
A default implementation of the
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
XYZLabelGenerator
interface.
The implementation uses a Formatter
instance to generate
the labels, which are typically used as the series labels in the chart
legend. Three values are passed to the formatter for possible inclusion
in the resulting label: (1) the key for the series, (2) the count for the
number of items in the series (as an Integer
) and (3) the total
of the non-NaN
values in the series (as a Double
).
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
- Since:
- 1.2
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
A label template that will display the series key followed by the number of data items for the series (in brackets).static final String
The default label template.static final String
A label template that will display the series key only.static final String
A label template that will display the series key followed by the total of the data items for the series (in brackets) with zero decimal places.static final String
A label template that will display the series key followed by the total of the data items for the series (in brackets) with zero decimal places. -
Constructor Summary
ConstructorsConstructorDescriptionThe default constructor.StandardXYZLabelGenerator
(String template) Creates a new instance with the specified label template. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests this label generator for equality with an arbitrary object.<S extends Comparable<S>>
StringgenerateSeriesLabel
(XYZDataset<S> dataset, S seriesKey) Generates a series label.int
hashCode()
-
Field Details
-
KEY_ONLY_TEMPLATE
A label template that will display the series key only.- See Also:
-
TOTAL_TEMPLATE
A label template that will display the series key followed by the total of the data items for the series (in brackets) with zero decimal places.- See Also:
-
TOTAL_TEMPLATE_2DP
A label template that will display the series key followed by the total of the data items for the series (in brackets) with zero decimal places.- See Also:
-
COUNT_TEMPLATE
A label template that will display the series key followed by the number of data items for the series (in brackets).- See Also:
-
DEFAULT_TEMPLATE
The default label template.- See Also:
-
-
Constructor Details
-
StandardXYZLabelGenerator
public StandardXYZLabelGenerator()The default constructor. -
StandardXYZLabelGenerator
Creates a new instance with the specified label template.- Parameters:
template
- the label template (null
not permitted).
-
-
Method Details
-
generateSeriesLabel
Generates a series label.- Specified by:
generateSeriesLabel
in interfaceXYZLabelGenerator
- Type Parameters:
S
- The type of the series keys in the dataset.- Parameters:
dataset
- the dataset (null
not permitted).seriesKey
- the series key (null
not permitted).- Returns:
- The series label (possibly
null
).
-
equals
Tests this label generator for equality with an arbitrary object. -
hashCode
-