javax.swing
Class AbstractSpinnerModel
- SpinnerModel
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
minimum, maximum, and value properties and the getNextValue
and getPreviousValue methods.
clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait |
extends EventListener> T[] getListeners
public extends EventListener> T[] getListeners(Class 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);
listenerType - the type of listeners to return, e.g. ChangeListener.class
- all of the objects receiving listenerType notifications
from this model
fireStateChanged
protected void fireStateChanged()
Run each ChangeListeners stateChanged() method.
getChangeListeners
public ChangeListener[] getChangeListeners()
Returns an array of all the ChangeListeners added
to this AbstractSpinnerModel with addChangeListener().
- all of the
ChangeListeners added or an empty
array if no listeners have been added