Java javax.swing SpinnerNumberModel fields, constructors, methods, implement or subclass

Example usage for Java javax.swing SpinnerNumberModel fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.swing SpinnerNumberModel.

The text is from its open source code.

Subclass

javax.swing.SpinnerNumberModel has subclasses.
Click this link to see all its subclasses.

Constructor

SpinnerNumberModel(Number value, Comparable minimum, Comparable maximum, Number stepSize)
Constructs a SpinnerModel that represents a closed sequence of numbers from minimum to maximum.
SpinnerNumberModel(int value, int minimum, int maximum, int stepSize)
Constructs a SpinnerNumberModel with the specified value, minimum/maximum bounds, and stepSize.
SpinnerNumberModel(double value, double minimum, double maximum, double stepSize)
Constructs a SpinnerNumberModel with the specified value, minimum/maximum bounds, and stepSize.
SpinnerNumberModel()
Constructs a SpinnerNumberModel with no minimum or maximum value, stepSize equal to one, and an initial value of zero.

Method

voidaddChangeListener(ChangeListener l)
Adds a ChangeListener to the model's listener list.
ChangeListener[]getChangeListeners()
Returns an array of all the ChangeListeners added to this AbstractSpinnerModel with addChangeListener().
ComparablegetMaximum()
Returns the last number in the sequence.
ComparablegetMinimum()
Returns the first number in this sequence.
NumbergetNumber()
Returns the value of the current element of the sequence.
NumbergetStepSize()
Returns the size of the value change computed by the getNextValue and getPreviousValue methods.
ObjectgetValue()
Returns the value of the current element of the sequence.
voidremoveChangeListener(ChangeListener l)
Removes a ChangeListener from the model's listener list.
voidsetMaximum(Comparable maximum)
Changes the upper bound for numbers in this sequence.
voidsetMinimum(Comparable minimum)
Changes the lower bound for numbers in this sequence.
voidsetStepSize(Number stepSize)
Changes the size of the value change computed by the getNextValue and getPreviousValue methods.
voidsetValue(Object value)
Sets the current value for this sequence.