API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing. SpinnerNumberModel View Source
Author(s)
Hans Muller
Since
1.4
Version
1.13 11/17/05
Serial
Hierarchy
 Object
      AbstractSpinnerModel
          SpinnerNumberModel
Implements
 Serializable
Subclasses
Description
public class SpinnerNumberModel
  A SpinnerModel for sequences of numbers.
Constructors
public SpinnerNumberModel ()
Constructs a SpinnerNumberModel with no minimum or maximum value, stepSize equal to one, and an initial value of zero.
public SpinnerNumberModel (double value, double minimum, double maximum, double stepSize)
  Constructs a SpinnerNumberModel with the specified value, minimum/maximum bounds, and stepSize.
public SpinnerNumberModel (int value, int minimum, int maximum, int stepSize)
  Constructs a SpinnerNumberModel with the specified value, minimum/maximum bounds, and stepSize.
public SpinnerNumberModel (Number value, Comparable minimum, Comparable maximum, Number stepSize)
  Constructs a SpinnerModel that represents a closed sequence of numbers from minimum to maximum.
Methods
Hide/Show inherited methods
public void addChangeListener (ChangeListener l) [Inherited From AbstractSpinnerModel]
  Adds a ChangeListener to the model's listener list.
protected void fireStateChanged () [Inherited From AbstractSpinnerModel]
  Run each ChangeListeners stateChanged() method.
public ChangeListener getChangeListeners () [Inherited From AbstractSpinnerModel]
  Returns an array of all the ChangeListeners added to this AbstractSpinnerModel with addChangeListener().
public T getListeners (Class< T> listenerType) [Inherited From AbstractSpinnerModel]
  Return an array of all the listeners of the given type that were added to this model.
public Comparable getMaximum ()
  Returns the last number in the sequence.
public Comparable getMinimum ()
  Returns the first number in this sequence.
public Object getNextValue ()
  Returns the next number in the sequence.
public Number getNumber ()
  Returns the value of the current element of the sequence.
public Object getPreviousValue ()
  Returns the previous number in the sequence.
public Number getStepSize ()
  Returns the size of the value change computed by the getNextValue and getPreviousValue methods.
public Object getValue ()
  Returns the value of the current element of the sequence.
public void removeChangeListener (ChangeListener l) [Inherited From AbstractSpinnerModel]
  Removes a ChangeListener from the model's listener list.
public void setMaximum (Comparable maximum)
  Changes the upper bound for numbers in this sequence.
public void setMinimum (Comparable minimum)
  Changes the lower bound for numbers in this sequence.
public void setStepSize (Number stepSize)
  Changes the size of the value change computed by the getNextValue and getPreviousValue methods.
public void setValue (Object value)
  Sets the current value for this sequence.
Fields
Hide/Show inherited fields
protected EventListenerList listenerList [Inherited From AbstractSpinnerModel]
  The list of ChangeListeners for this model.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar