javax.swing
public interface SpinnerModel
Since: 1.4
Method Summary | |
---|---|
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.
|
ChangeListener
to the list of registered
listeners. Each listener is notified when the current value
is changed.
Parameters: listener The new listener to register.
Returns: The next value, or null if there are no more values to retrieve.
Returns: The previous value, or null if there are no more values to retrieve.
Returns: The current value.
ChangeListener
from the list
of registered listeners.
Parameters: listener The listener to remove.
ChangeListener
s.
Parameters: value The new value of the model.
Throws: IllegalArgumentException if the model does not accept the given value.