| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public abstract class AbstractSpinnerModel extends Object implements 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
setValue
, getValue
, getNextValue
and
getPreviousValue
methods.
Field Summary | |
---|---|
protected EventListenerList |
listenerList
The list of ChangeListeners for this model. |
Constructor Summary | |
---|---|
|
Method Summary | |
---|---|
void |
Adds a ChangeListener to the model's listener list. |
protected void |
Run each ChangeListeners stateChanged() method. |
ChangeListener[] |
Returns an array of all the ChangeListener s added
to this AbstractSpinnerModel with addChangeListener().
|
EventListener[] |
getListeners(Class listenerType) Return an array of all the listeners of the given type that were added to this model. |
void |
Removes a ChangeListener from the model's listener list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EventListenerList listenerList
Constructor Detail |
---|
public AbstractSpinnerModel()
Method Detail |
---|
public void addChangeListener(ChangeListener l)
l
- the ChangeListener to addprotected void fireStateChanged()
public ChangeListener[] getChangeListeners()
ChangeListener
s added
to this AbstractSpinnerModel with addChangeListener().
ChangeListener
s added or an empty
array if no listeners have been addedpublic EventListener[] getListeners(Class listenerType)
myAbstractSpinnerModel.getListeners(ChangeListener.class);
listenerType
- the type of listeners to return, e.g. ChangeListener.classpublic void removeChangeListener(ChangeListener l)
l
- the ChangeListener to remove
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |