MDateSelector

mseries.ui
Interface SpinnerModel

All Known Implementing Classes:
DefaultSpinnerModel, MDateSpinnerModel

public interface SpinnerModel

The SpinnerModel interface represents a sequence of values. Each value can only be accessed using the getValue(), getNextValue() or getPreviousValue() methods. Random access is not allowed. The set of values in the sequence is unbounded though implementations are at liberty to impose bounds. The step is the amount which the current value will change when the next or previous values are requested.

A Spinner model is usually rendered in the Spinner by a SpinnerEditor which is aware of the actual data types encapsuated in any particular model. The model notifies the editor of changes by firing ChangeEvents.

See Also:
mseries.ui.SpinnerEditor

Method Summary
 void addChangeListener(ChangeListener x)
          ChangeEvents are fired to registered listeners when the current value is changed
 Object getNextValue()
          Advances to and returns the next value in the sequence depending on the step size
 Object getPreviousValue()
          Advances to and returns the previous value in the sequence depending on the step size
 Object getValue()
          Returns the current value
 void removeChangeListener(ChangeListener x)
           
 void setStep(int step)
          Sets the step size to indicate how far getNextValue and getPreviousValue should move in the set.
 void setValue(Object v)
          Sets a value in the model which may or may not be in the sequence
 

Method Detail

getValue

Object getValue()
Returns the current value


setValue

void setValue(Object v)
Sets a value in the model which may or may not be in the sequence


setStep

void setStep(int step)
Sets the step size to indicate how far getNextValue and getPreviousValue should move in the set.


getNextValue

Object getNextValue()
Advances to and returns the next value in the sequence depending on the step size


getPreviousValue

Object getPreviousValue()
Advances to and returns the previous value in the sequence depending on the step size


addChangeListener

void addChangeListener(ChangeListener x)
ChangeEvents are fired to registered listeners when the current value is changed


removeChangeListener

void removeChangeListener(ChangeListener x)

MDateSelector

Copyright © 2001-2007 M Newstead. All Rights Reserved.