Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uchicago.src.sim.event
Class SliderListener

    java.lang.Object
      uchicago.src.sim.event.SliderListener

All Implemented Interfaces:
  java.util.EventListener, javax.swing.event.ChangeListener

    public abstract class SliderListener

extends java.lang.Object
implements javax.swing.event.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.

Version:
  $Revision: 1.4 $ $Date: 2004/11/03 19:51:06 $
Author:
  Nick Collier

Field Summary
`protected boolean` | `isAdjusting`
`protected boolean` | `isSlidingLeft`
`protected int` | `prevValue`
`protected int` | `value`

Constructor Summary
`SliderListener()`

Method Summary
`abstract void` | `execute()` Called whenever the JSlider for which this is a listener is moved.
`void` | `setFirstVal(int val)`
`void` | `stateChanged(javax.swing.event.ChangeEvent evt)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### prevValue

    protected int prevValue

### value

    protected int value

### isAdjusting

    protected boolean isAdjusting

### isSlidingLeft

    protected boolean isSlidingLeft

Constructor Detail

### SliderListener

    public SliderListener()

Method Detail

### stateChanged

    public void stateChanged(javax.swing.event.ChangeEvent evt)

  Specified by:
    `stateChanged` in interface `javax.swing.event.ChangeListener`

### setFirstVal

    public void setFirstVal(int val)

### execute

    public abstract void execute()

  Called whenever the JSlider for which this is a listener is moved.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD