public abstract class SpinnerTypedNumberModel<T extends Number> extends SpinnerNumberModel
SpinnerNumberModel
implementations for
non-primitive Number
types, such as BigInteger
and
BigDecimal
.SpinnerBigIntegerModel
,
SpinnerBigDecimalModel
,
Serialized FormlistenerList
Constructor and Description |
---|
SpinnerTypedNumberModel(Class<T> type,
T value,
Comparable<T> min,
Comparable<T> max,
T stepSize) |
Modifier and Type | Method and Description |
---|---|
Comparable<T> |
getMaximum() |
Comparable<T> |
getMinimum() |
T |
getNextValue() |
T |
getNumber() |
T |
getPreviousValue() |
T |
getStepSize() |
T |
getValue() |
void |
setMaximum(Comparable maximum) |
void |
setMinimum(Comparable minimum) |
void |
setStepSize(Number stepSize) |
void |
setValue(Object value) |
protected abstract T |
stepDown() |
protected abstract T |
stepUp() |
addChangeListener, fireStateChanged, getChangeListeners, getListeners, removeChangeListener
public SpinnerTypedNumberModel(Class<T> type, T value, Comparable<T> min, Comparable<T> max, T stepSize)
protected abstract T stepUp()
protected abstract T stepDown()
public Comparable<T> getMaximum()
getMaximum
in class SpinnerNumberModel
public Comparable<T> getMinimum()
getMinimum
in class SpinnerNumberModel
public T getNextValue()
getNextValue
in interface SpinnerModel
getNextValue
in class SpinnerNumberModel
public T getNumber()
getNumber
in class SpinnerNumberModel
public T getPreviousValue()
getPreviousValue
in interface SpinnerModel
getPreviousValue
in class SpinnerNumberModel
public T getStepSize()
getStepSize
in class SpinnerNumberModel
public T getValue()
getValue
in interface SpinnerModel
getValue
in class SpinnerNumberModel
public void setMaximum(Comparable maximum)
setMaximum
in class SpinnerNumberModel
public void setMinimum(Comparable minimum)
setMinimum
in class SpinnerNumberModel
public void setStepSize(Number stepSize)
setStepSize
in class SpinnerNumberModel
public void setValue(Object value)
setValue
in interface SpinnerModel
setValue
in class SpinnerNumberModel
Copyright © 2015–2022 SciJava. All rights reserved.