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


Variable Index

 o bar
 o disp
 o label
 o offset
 o stepsize

Constructor Index

 o LabelledScroller(String)
just specify the label
 o LabelledScroller(String, double, double)
specify the label, and the range of allowed values
 o LabelledScroller(String, int, int)

Method Index

 o addNotify()
 o fixField()
 o getMaxValue()
 o getMinValue()
 o getValue()
 o handleEvent(Event)
 o setRange(double, double)
set the range of values the user is able to scroll through
 o setValue(double)

Variables

 o offset
 protected double offset
 o stepsize
 protected double stepsize
 o label
 protected Label label
 o disp
 protected DoubleTextDisplay disp
 o bar
 protected Scrollbar bar

Constructors

 o 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
 o LabelledScroller
 public LabelledScroller(String l)
just specify the label

 o LabelledScroller
 public LabelledScroller(String l,
                         double min,
                         double max)
specify the label, and the range of allowed values

Methods

 o addNotify
 public void addNotify()
Overrides:
addNotify in class Panel
 o handleEvent
 public boolean handleEvent(Event e)
Overrides:
handleEvent in class Component
 o setRange
 public void setRange(double min,
                      double max)
set the range of values the user is able to scroll through

 o getValue
 public double getValue()
 o setValue
 public void setValue(double d)
 o fixField
 public void fixField()
 o getMinValue
 public double getMinValue()
 o getMaxValue
 public double getMaxValue()

All Packages  Class Hierarchy  This Package  Previous  Next  Index