public class LabeledValue extends Object implements Serializable
Very primitive class comparable to a c struct.
Modifier and Type | Field and Description |
---|---|
protected boolean |
m_isMajorTick
The flag showing if this label is a major tick.
|
protected String |
m_label
The label.
|
protected double |
m_value
The corresponding value scaled to a position between 0.0 and 1.0.
|
Constructor and Description |
---|
LabeledValue()
Internal defcon.
|
Modifier and Type | Method and Description |
---|---|
String |
getLabel()
Returns the label String.
|
double |
getValue()
Returns the value of this label which is scaled to lie between 0.0 and 1.0.
|
boolean |
isMajorTick()
Returns true if this label is a major tick, false else.
|
void |
setLabel(String label)
Sets the label String.
|
void |
setMajorTick(boolean isMajorTick)
Set this label as a major tick.
|
void |
setValue(double value)
Sets the value.
|
String |
toString()
Returns the concatenation of the label string, ':' and the value's String
representation.
|
protected boolean m_isMajorTick
protected String m_label
protected double m_value
public String getLabel()
public double getValue()
public boolean isMajorTick()
AAxis.setMajorTickSpacing(double)
,
AAxis.setMinorTickSpacing(double)
public void setLabel(String label)
label
- the label String.public void setMajorTick(boolean isMajorTick)
isMajorTick
- the major tick state to set.AAxis.setMajorTickSpacing(double)
,
AAxis.setMinorTickSpacing(double)
public final void setValue(double value)
value
- The value to set.public String toString()
toString
in class Object
Object.toString()
Copyright © 2018. All rights reserved.