Package info.monitorenter.gui.chart
Class LabeledValue
- java.lang.Object
-
- info.monitorenter.gui.chart.LabeledValue
-
public class LabeledValue extends java.lang.ObjectA double value along with it's label.Very primitive class comparable to a c struct.
- Version:
- $Revision: 1.7 $
- Author:
- Achim Westermann
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_isMajorTickThe flag showing if this label is a major tick.protected java.lang.Stringm_labelThe label.protected doublem_valueThe corresponding value scaled to a position between 0.0 and 1.0.
-
Constructor Summary
Constructors Constructor Description LabeledValue()Internal defcon.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetLabel()Returns the label String.doublegetValue()Returns the value of this label which is scaled to lie between 0.0 and 1.0.booleanisMajorTick()Returns true if this label is a major tick, false else.voidsetLabel(java.lang.String label)Sets the label String.voidsetMajorTick(boolean isMajorTick)Set this label as a major tick.voidsetValue(double value)Sets the value.java.lang.StringtoString()Returns the concatenation of the label string, ':' and the value's String representation.
-
-
-
Method Detail
-
getLabel
public java.lang.String 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:
AAxis.setMajorTickSpacing(double),AAxis.setMinorTickSpacing(double)
-
setLabel
public void setLabel(java.lang.String label)
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:
AAxis.setMajorTickSpacing(double),AAxis.setMinorTickSpacing(double)
-
setValue
public final void setValue(double value)
Sets the value.- Parameters:
value- The value to set.
-
toString
public java.lang.String toString()
Returns the concatenation of the label string, ':' and the value's String representation.- Overrides:
toStringin classjava.lang.Object- Returns:
- the concatenation of the label string, ':' and the value's String representation.
- See Also:
Object.toString()
-
-