Home » openjdk-7 » javax » swing » [javadoc | source]
javax.swing
abstract public class: AbstractSpinnerModel [javadoc | source]
java.lang.Object
   javax.swing.AbstractSpinnerModel

All Implemented Interfaces:
    SpinnerModel, Serializable

Direct Known Subclasses:
    SpinnerListModel, SpinnerDateModel, SpinnerNumberModel

This class provides the ChangeListener part of the SpinnerModel interface that should be suitable for most concrete SpinnerModel implementations. Subclasses must provide an implementation of the setValue, getValue, getNextValue and getPreviousValue methods.
Field Summary
protected  EventListenerList listenerList    The list of ChangeListeners for this model. Subclasses may store their own listeners here. 
Method from javax.swing.AbstractSpinnerModel Summary:
addChangeListener,   fireStateChanged,   getChangeListeners,   getListeners,   removeChangeListener
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.AbstractSpinnerModel Detail:
 public  void addChangeListener(ChangeListener l) 
    Adds a ChangeListener to the model's listener list. The ChangeListeners must be notified when the models value changes.
 protected  void fireStateChanged() 
    Run each ChangeListeners stateChanged() method.
 public ChangeListener[] getChangeListeners() 
    Returns an array of all the ChangeListeners added to this AbstractSpinnerModel with addChangeListener().
 public T[] getListeners(Class<T> listenerType) 
    Return an array of all the listeners of the given type that were added to this model. For example to find all of the ChangeListeners added to this model:
    myAbstractSpinnerModel.getListeners(ChangeListener.class);
    
 public  void removeChangeListener(ChangeListener l) 
    Removes a ChangeListener from the model's listener list.