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 StringA label template that will display the series key followed by the number of data items for the series (in brackets).static final StringThe default label template.static final StringA label template that will display the series key only.static final StringA 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 StringA 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 TypeMethodDescriptionbooleanTests this label generator for equality with an arbitrary object.<S extends Comparable<S>>
StringgenerateSeriesLabel(XYZDataset<S> dataset, S seriesKey) Generates a series label.inthashCode()
-
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 (nullnot permitted).
-
-
Method Details
-
generateSeriesLabel
Generates a series label.- Specified by:
generateSeriesLabelin interfaceXYZLabelGenerator- Type Parameters:
S- The type of the series keys in the dataset.- Parameters:
dataset- the dataset (nullnot permitted).seriesKey- the series key (nullnot permitted).- Returns:
- The series label (possibly
null).
-
equals
Tests this label generator for equality with an arbitrary object. -
hashCode
-