All Packages Class Hierarchy This Package Previous Next Index
Class utils.GUI.LabelledScroller
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----utils.GUI.LabelledScroller
- public class LabelledScroller
- extends Panel
a component which has: a Label, a Scrollbar and a DoubleTextDisplay.
the value depends linearly on the position of the Scrollbar marker.
when the user changes the value of the component by moving the
Srollbar, it generates ACTION_EVENTs with an arg that is
a Double containing the new value of the component
-
bar
-
-
disp
-
-
label
-
-
offset
-
-
stepsize
-
-
LabelledScroller(String)
- just specify the label
-
LabelledScroller(String, double, double)
- specify the label, and the range of allowed values
-
LabelledScroller(String, int, int)
-
-
addNotify()
-
-
fixField()
-
-
getMaxValue()
-
-
getMinValue()
-
-
getValue()
-
-
handleEvent(Event)
-
-
setRange(double, double)
- set the range of values the user is able to scroll through
-
setValue(double)
-
offset
protected double offset
stepsize
protected double stepsize
label
protected Label label
disp
protected DoubleTextDisplay disp
bar
protected Scrollbar bar
LabelledScroller
public LabelledScroller(String l,
int sigfig,
int size)
- Parameters:
- l - == label
- sigfig - == number of significant figures
- size - == maximum number of characters in the display
LabelledScroller
public LabelledScroller(String l)
- just specify the label
LabelledScroller
public LabelledScroller(String l,
double min,
double max)
- specify the label, and the range of allowed values
addNotify
public void addNotify()
- Overrides:
- addNotify in class Panel
handleEvent
public boolean handleEvent(Event e)
- Overrides:
- handleEvent in class Component
setRange
public void setRange(double min,
double max)
- set the range of values the user is able to scroll through
getValue
public double getValue()
setValue
public void setValue(double d)
fixField
public void fixField()
getMinValue
public double getMinValue()
getMaxValue
public double getMaxValue()
All Packages Class Hierarchy This Package Previous Next Index