public class ChartValue extends Object implements Cloneable
ChartValue
consists of a name (which is used to look up the data value in a
DataSample
), a label (which is used when rendering the legend
for a chart), and a color (which is used by the ChartView
to
render the value).DataSample
,
ChartView
,
ChartLegend
Modifier and Type | Field and Description |
---|---|
private Color |
color |
private String |
label |
private String |
name |
Constructor and Description |
---|
ChartValue(String name,
String label,
Color color)
Construct a new
ChartValue with the specified variable name,
label, and color. |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Create a copy of this object.
|
Color |
getColor()
Get the color for this value.
|
String |
getLabel()
Get the textual label for this variable.
|
String |
getName()
Get the name of the variable that contains this value.
|
void |
setColor(Color color)
Set the color for this value.
|
void |
setLabel(String label)
set the textual label for this variable.
|
void |
setName(String name)
Set the name of the variable that contains this value.
|
public ChartValue(String name, String label, Color color)
ChartValue
with the specified variable name,
label, and color.name
- The name of the variable that contains this value.label
- The textual label for this value.color
- The color in which to render the graphical representation of
this value.public String getName()
public void setName(String name)
name
- The variable name.public void setLabel(String label)
label
- The label.public void setColor(Color color)
color
- The color.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses