public class StandardXYZItemLabelGenerator extends java.lang.Object implements XYZItemLabelGenerator, java.io.Serializable
XYZItemLabelGenerator interface.
The implementation uses a Formatter instance to generate
the item labels. Four values are passed to the formatter for possible
inclusion in the resulting label: (1) the key for the series,
(2) the x-value (3) the y-value and (4) the z-value.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COORDS_3DP_TEMPLATE
A label template that will display the (x, y, z) coordinates with 3
decimal places.
|
static java.lang.String |
DEFAULT_TEMPLATE
The default label template.
|
static java.lang.String |
KEY_AND_COORDS_3DP_TEMPLATE
A label template that will display the series key followed by the
(x, y, z) coordinates with 3 decimal places.
|
| Constructor and Description |
|---|
StandardXYZItemLabelGenerator()
The default constructor.
|
StandardXYZItemLabelGenerator(java.lang.String template)
Creates a new instance with the specified label template.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests this label generator for equality with an arbitrary object.
|
java.lang.String |
generateItemLabel(XYZDataset dataset,
java.lang.Comparable<?> seriesKey,
int itemIndex)
Generates a label for the specified data item.
|
XYZDataItemSelection |
getItemSelection()
Returns the item selection (if this is non-
null, labels
will only be generated for the items in the selection). |
int |
hashCode() |
void |
setItemSelection(XYZDataItemSelection selection)
Sets the item selection, which can be used to specify a subset of the
data items that should have item labels generated.
|
public static final java.lang.String KEY_AND_COORDS_3DP_TEMPLATE
public static final java.lang.String COORDS_3DP_TEMPLATE
public static final java.lang.String DEFAULT_TEMPLATE
public StandardXYZItemLabelGenerator()
public StandardXYZItemLabelGenerator(java.lang.String template)
template - the label template (null not permitted).public XYZDataItemSelection getItemSelection()
null, labels
will only be generated for the items in the selection).null).public void setItemSelection(XYZDataItemSelection selection)
null then item labels will be generated for all items.selection - the selection (null permitted).public java.lang.String generateItemLabel(XYZDataset dataset, java.lang.Comparable<?> seriesKey, int itemIndex)
generateItemLabel in interface XYZItemLabelGeneratordataset - the dataset (null not permitted).seriesKey - the series key (null not permitted).itemIndex - the item index.null).public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).public int hashCode()
hashCode in class java.lang.Object