Package info.monitorenter.gui.chart
Class LabeledValue
java.lang.Object
info.monitorenter.gui.chart.LabeledValue
A double value along with it's label.
Very primitive class comparable to a c struct.
- Version:
- $Revision: 1.7 $
- Author:
- Achim Westermann
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
The flag showing if this label is a major tick.protected String
The label.protected double
The corresponding value scaled to a position between 0.0 and 1.0. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()
Returns the label String.double
getValue()
Returns the value of this label which is scaled to lie between 0.0 and 1.0.boolean
Returns true if this label is a major tick, false else.void
Sets the label String.void
setMajorTick
(boolean isMajorTick) Set this label as a major tick.final void
setValue
(double value) Sets the value.toString()
Returns the concatenation of the label string, ':' and the value's String representation.
-
Field Details
-
m_isMajorTick
protected boolean m_isMajorTickThe flag showing if this label is a major tick. -
m_label
The label. -
m_value
protected double m_valueThe corresponding value scaled to a position between 0.0 and 1.0.
-
-
Constructor Details
-
LabeledValue
public LabeledValue()Internal defcon.
-
-
Method Details
-
getLabel
Returns the label String.- Returns:
- the label String.
-
getValue
public double getValue()Returns the value of this label which is scaled to lie between 0.0 and 1.0.- Returns:
- the value of this label which is scaled to lie between 0.0 and 1.0.
-
isMajorTick
public boolean isMajorTick()Returns true if this label is a major tick, false else.- Returns:
- true if this label is a major tick, false else.
- See Also:
-
setLabel
Sets the label String.- Parameters:
label
- the label String.
-
setMajorTick
public void setMajorTick(boolean isMajorTick) Set this label as a major tick.- Parameters:
isMajorTick
- the major tick state to set.- See Also:
-
setValue
public final void setValue(double value) Sets the value.- Parameters:
value
- The value to set.
-
toString
Returns the concatenation of the label string, ':' and the value's String representation.
-