public class LabeledValue
extends java.lang.Object
Very primitive class comparable to a c struct.
Modifier and Type | Field | Description |
---|---|---|
protected boolean |
m_isMajorTick |
The flag showing if this label is a major tick.
|
protected java.lang.String |
m_label |
The label.
|
protected double |
m_value |
The corresponding value scaled to a position between 0.0 and 1.0.
|
Constructor | Description |
---|---|
LabeledValue() |
Internal defcon.
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.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(java.lang.String label) |
Sets the label String.
|
void |
setMajorTick(boolean isMajorTick) |
Set this label as a major tick.
|
void |
setValue(double value) |
Sets the value.
|
java.lang.String |
toString() |
Returns the concatenation of the label string, ':' and the value's String
representation.
|
protected boolean m_isMajorTick
protected java.lang.String m_label
protected double m_value
public java.lang.String getLabel()
public double getValue()
public boolean isMajorTick()
AAxis.setMajorTickSpacing(double)
,
AAxis.setMinorTickSpacing(double)
public void setLabel(java.lang.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 java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
Copyright © 2001 - 2010 LGPL, All Rights Footloose.