org.malai.widget
Class MSpinner.MSpinnerNumberModel
java.lang.Object
javax.swing.AbstractSpinnerModel
javax.swing.SpinnerNumberModel
org.malai.widget.MSpinner.MSpinnerNumberModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.SpinnerModel
- Enclosing class:
- MSpinner
public static class MSpinner.MSpinnerNumberModel
- extends javax.swing.SpinnerNumberModel
The number model to use with a MSpinner. Compared to SpinnerNumberModel this model provides
'safely' operations to change minimum and maximum values without firing any event (that may
produce actions).
- Since:
- 0.2
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractSpinnerModel |
listenerList |
Constructor Summary |
MSpinner.MSpinnerNumberModel(java.lang.Number value,
java.lang.Comparable<?> minimum,
java.lang.Comparable<?> maximum,
java.lang.Number stepSize)
SpinnerNumberModel.SpinnerNumberModel(Number, Comparable, Comparable, Number) |
Method Summary |
void |
setMaximumSafely(java.lang.Comparable<?> max)
Changes the upper bound for numbers in this sequence without firing any event (that may produce actions). |
void |
setMinumunSafely(java.lang.Comparable<?> min)
Changes the lower bound for numbers in this sequence without firing any event (that may
produce actions). |
Methods inherited from class javax.swing.SpinnerNumberModel |
getMaximum, getMinimum, getNextValue, getNumber, getPreviousValue, getStepSize, getValue, setMaximum, setMinimum, setStepSize, setValue |
Methods inherited from class javax.swing.AbstractSpinnerModel |
addChangeListener, fireStateChanged, getChangeListeners, getListeners, removeChangeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
MSpinner.MSpinnerNumberModel
public MSpinner.MSpinnerNumberModel(java.lang.Number value,
java.lang.Comparable<?> minimum,
java.lang.Comparable<?> maximum,
java.lang.Number stepSize)
SpinnerNumberModel.SpinnerNumberModel(Number, Comparable, Comparable, Number)
- Parameters:
value
- the current (non null
) value of the modelminimum
- the first number in the sequence or null
maximum
- the last number in the sequence or null
stepSize
- the difference between elements of the sequence
setMinumunSafely
public void setMinumunSafely(java.lang.Comparable<?> min)
- Changes the lower bound for numbers in this sequence without firing any event (that may
produce actions).
SpinnerNumberModel.setMinimum(Comparable)
- Parameters:
min
- The new minimum value. Can be null.- Since:
- 0.2
setMaximumSafely
public void setMaximumSafely(java.lang.Comparable<?> max)
- Changes the upper bound for numbers in this sequence without firing any event (that may produce actions).
SpinnerNumberModel.setMaximum(Comparable)
- Parameters:
max
- The new maximum value. Can be null.- Since:
- 0.2