|
MDateSelector | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmseries.ui.DefaultSpinnerModel
mseries.ui.MDateSpinnerModel
public class MDateSpinnerModel
Spinner model to manage a range of dates. This one is a little special in that in allows each part (month, day, year etc) of a date to be spun independantly. In other words the step is variable .The value is always a Date but the step changes usually by the editor according to where the user places the cursor.
| Constructor Summary | |
|---|---|
MDateSpinnerModel()
Defualt constructor initialised to todays date and default maximum and minimum |
|
MDateSpinnerModel(Date start)
Constructor with default minimum and maximum values (1/1/1970 and 31/12/2037 respectively) |
|
MDateSpinnerModel(Date start,
Comparable max,
Comparable min)
Constructor. |
|
| Method Summary | |
|---|---|
Comparable |
getMaximum()
Returns the maximum value |
Comparable |
getMinimum()
Returns the minimum value |
Object |
getNextValue()
Advance and return the next value in the sequence according to the step value and maximum |
Object |
getPreviousValue()
Advance and return the previous value in the sequence according to the step value and minimum |
Object |
getValue()
Returns the current value of the field |
void |
setMaximum(Comparable max)
Sets the maximum allowed value in the model |
void |
setMinimum(Comparable min)
Sets the minimum allowed value in the model |
void |
setStep(int step)
Sets the step which is a constant from java.text.DateFormat |
void |
setValue(Object newValue)
Sets a new value in the model |
| 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 |
| Constructor Detail |
|---|
public MDateSpinnerModel(Date start,
Comparable max,
Comparable min)
start - the initial valuemax - the maximum value allowedmin - the minimum value allowedpublic MDateSpinnerModel(Date start)
start - the initial valuepublic MDateSpinnerModel()
| Method Detail |
|---|
public void setStep(int step)
setStep in interface SpinnerModelsetStep in class DefaultSpinnerModelstep - the step valuepublic Object getValue()
getValue in interface SpinnerModelgetValue in class DefaultSpinnerModelpublic void setValue(Object newValue)
setValue in interface SpinnerModelsetValue in class DefaultSpinnerModelnewValue - the new valuepublic void setMaximum(Comparable max)
max - the maximum valuepublic Comparable getMaximum()
public void setMinimum(Comparable min)
min - the minimum valuepublic Comparable getMinimum()
public Object getNextValue()
getNextValue in interface SpinnerModelgetNextValue in class DefaultSpinnerModelpublic Object getPreviousValue()
getPreviousValue in interface SpinnerModelgetPreviousValue in class DefaultSpinnerModel
|
MDateSelector | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||