uchicago.src.sim.event
Class SliderListener
java.lang.Object
|
+--uchicago.src.sim.event.SliderListener
- All Implemented Interfaces:
- ChangeListener, EventListener
- public abstract class SliderListener
- extends Object
- implements ChangeListener
Abstract implementation of a ChangeListener. Will call the execute
method whenever the JSlider being listened to fires a ChangeEvent, that is,
whenever the slider is moved the execute() method will be called.
A modeler will implement this execute() method. Two variables are
available for use in the execute method.
- value - the current value of the slider
- isAdjusting - a boolean indicating whether the slider is in the
process of being adjusted. False indicates that the slider is no longer
being moved.
- isSlidingLeft - a boolean indicating whether the slider is being
adjusted to the left.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
prevValue
protected int prevValue
value
protected int value
isAdjusting
protected boolean isAdjusting
isSlidingLeft
protected boolean isSlidingLeft
SliderListener
public SliderListener()
stateChanged
public void stateChanged(ChangeEvent evt)
- Specified by:
stateChanged in interface ChangeListener
setFirstVal
public void setFirstVal(int val)
execute
public abstract void execute()
- Called whenever the JSlider for which this is a listener is moved.
Bug reports and feature requests to RePast