|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uic.model.SpinboxModel
public class SpinboxModel
Constructor Summary | |
---|---|
SpinboxModel(double initialValue,
double min,
double max,
double step)
Constructor. |
|
SpinboxModel(int initialValue,
int min,
int max,
int step)
Constructor. |
|
SpinboxModel(Number initialValue,
Number min,
Number max)
Constructor. |
|
SpinboxModel(Number initialValue,
Number min,
Number max,
Number step)
Constructor. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
|
Number |
getDelta()
|
Number |
getMaximumValue()
Return the maximum value possible. |
Number |
getMinimumValue()
Return the minimum value possible. |
Number |
getNextValue()
|
Number |
getPreviousValue()
|
Number |
getStepSize()
|
Number |
getValue()
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
|
void |
setDelta(Number delta)
|
void |
setMaximumValue(Number max)
|
void |
setMinimumValue(Number min)
|
void |
setRange(Number min,
Number max)
Sets the range of possible values. |
void |
setStepSize(Number step)
|
void |
setValue(Number value)
Sets the value of the model. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpinboxModel(Number initialValue, Number min, Number max)
initialValue
- the initial value of this modelmin
- the minimum value this model can containmax
- the maximum value this model can containpublic SpinboxModel(int initialValue, int min, int max, int step)
initialValue
- the initial value of this modelmin
- the minimum value this model can containmax
- the maximum value this model can containstep
- the steps that are allowed to increase the value withpublic SpinboxModel(double initialValue, double min, double max, double step)
initialValue
- the initial value of this modelmin
- the minimum value this model can containmax
- the maximum value this model can containstep
- the steps that are allowed to increase the value withpublic SpinboxModel(Number initialValue, Number min, Number max, Number step)
initialValue
- the initial value of this modelmin
- the minimum value this model can containmax
- the maximum value this model can containstep
- the steps that are allowed to increase the value withMethod Detail |
---|
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface SpinboxModelInterface
public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface SpinboxModelInterface
public Number getValue()
getValue
in interface SpinboxModelInterface
public void setValue(Number value)
SpinboxModel model = new SpinboxModel(0, 0, 10, 2);
model.setValue(0); // will result in 0 in the ui
model.setValue(2); // will result in 2 in the ui
model.setValue(1); // will result in 2 in the ui
SpinboxModel model = new SpinboxModel(1, 1, 10, 2);
model.setValue(1); // will result in 1 in the ui
model.setValue(3); // will result in 3 in the ui
model.setValue(2); // will result in 3 in the ui
setValue
in interface SpinboxModelInterface
value
- the value to be set to the model
IllegalArgumentException
- when the value set is invalid according to the min/max/stepsize set.public Number getMinimumValue()
getMinimumValue
in interface SpinboxModelInterface
to set the minimum value
public void setMinimumValue(Number min)
public Number getMaximumValue()
getMaximumValue
in interface SpinboxModelInterface
to set the maximum value
public void setMaximumValue(Number max)
public void setRange(Number min, Number max)
min
- the minimum valuemax
- the maximum value
IllegalArgumentException
- when min <= maxpublic Number getStepSize()
public void setStepSize(Number step)
public void setDelta(Number delta)
public Number getDelta()
public Number getNextValue()
getNextValue
in interface SpinboxModelInterface
public Number getPreviousValue()
getPreviousValue
in interface SpinboxModelInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |