|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmseries.ui.DefaultSpinnerModel
gpl.fredy.generate.DoubleSpinnerModel
public class DoubleSpinnerModel
Model for MSpinner to manage Double. The range of parameters are expressed in the constructors
Field Summary | |
---|---|
protected double |
max
The default maximum value |
protected double |
min
The default minimum value |
protected double |
step
|
Constructor Summary | |
---|---|
DoubleSpinnerModel()
|
|
DoubleSpinnerModel(java.lang.Double start,
java.lang.Comparable max,
java.lang.Comparable min,
double step,
boolean roll)
Constructor |
|
DoubleSpinnerModel(double start,
double max,
double min,
double step,
boolean roll)
Constructor |
Method Summary | |
---|---|
java.lang.Comparable |
getMaximum()
Returns the current maximum value |
java.lang.Comparable |
getMinimum()
Returns the current minimum value |
java.lang.Object |
getNextValue()
Advances and returns the current value in the sequence according to the step, maximum value and roll attribute |
java.lang.Object |
getPreviousValue()
Retracts and returns the current value in the sequence according to the step, minimum value and roll attribute |
java.lang.Object |
getValue()
Returns the current value of the field |
void |
setMaximum(java.lang.Comparable max)
Used to force a maximum value when the field is incremented using the up button |
void |
setMaximum(double max)
Used to force a maximum value when the field is incremented using the up button |
void |
setMinimum(java.lang.Comparable min)
Used to force a minimum value when the field is decremented using the down button |
void |
setMinimum(double min)
Used to force a minimum value when the field is decremented using the down button |
void |
setStep(int step)
Doesn't need to do anything for Integers, the step is set when the model is constructed. |
void |
setValue(double newValue)
Sets the value |
void |
setValue(java.lang.Object newValue)
Sets the value |
Methods inherited from class mseries.ui.DefaultSpinnerModel |
---|
addChangeListener, notifyListeners, removeChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double min
protected double max
protected double step
Constructor Detail |
---|
public DoubleSpinnerModel()
public DoubleSpinnerModel(java.lang.Double start, java.lang.Comparable max, java.lang.Comparable min, double step, boolean roll)
start
- the initial valuemax
- the maximum valuemin
- the minimum valuestep
- the amount to increment/decrement the value by when
getNextValue/getPreviousValue are executedroll
- true if the value rolls over the maximum back to the minimumpublic DoubleSpinnerModel(double start, double max, double min, double step, boolean roll)
start
- the initial valuemax
- the maximum valuemin
- the minimum valuestep
- the amount to increment/decrement the value by when
getNextValue/getPreviousValue are executedroll
- true if the value rolls over the maximum back to the minimumMethod Detail |
---|
public void setStep(int step)
setStep
in interface mseries.ui.SpinnerModel
setStep
in class mseries.ui.DefaultSpinnerModel
public java.lang.Object getValue()
getValue
in interface mseries.ui.SpinnerModel
getValue
in class mseries.ui.DefaultSpinnerModel
public void setValue(double newValue)
newValue
- the new valuepublic void setValue(java.lang.Object newValue)
setValue
in interface mseries.ui.SpinnerModel
setValue
in class mseries.ui.DefaultSpinnerModel
newValue
- the new valuepublic java.lang.Object getNextValue()
getNextValue
in interface mseries.ui.SpinnerModel
getNextValue
in class mseries.ui.DefaultSpinnerModel
public java.lang.Object getPreviousValue()
getPreviousValue
in interface mseries.ui.SpinnerModel
getPreviousValue
in class mseries.ui.DefaultSpinnerModel
public void setMinimum(java.lang.Comparable min)
min
- the minimum valuepublic void setMinimum(double min)
min
- the minimum valuepublic java.lang.Comparable getMinimum()
public void setMaximum(java.lang.Comparable max)
max
- the maximum valuepublic void setMaximum(double max)
max
- the maximum valuepublic java.lang.Comparable getMaximum()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |