public interface SpinnerModel
JSpinner
s.Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener listener)
Adds a
ChangeListener to the list of registered
listeners. |
Object |
getNextValue()
Returns the next value from the model.
|
Object |
getPreviousValue()
Returns the previous value from the model.
|
Object |
getValue()
Returns the current value of the model.
|
void |
removeChangeListener(ChangeListener listener)
Removes a given
ChangeListener from the list
of registered listeners. |
void |
setValue(Object value)
Sets the current value of the model to that specified.
|
void setValue(Object value)
ChangeListener
s.value
- The new value of the model.IllegalArgumentException
- if the model does not accept
the given value.Object getNextValue()
Object getPreviousValue()
void addChangeListener(ChangeListener listener)
ChangeListener
to the list of registered
listeners. Each listener is notified when the current value
is changed.listener
- The new listener to register.void removeChangeListener(ChangeListener listener)
ChangeListener
from the list
of registered listeners.listener
- The listener to remove.