JSpinner + SpinnerDateModel not working as expected



Hi,

I want to perform a supposedly simple (?) task:
I need the client to select a timespan in which a certain taks is to be performed. Therefore, I have create 4 JSpinners with SpinnerDateModelS, in order to let the user select a start date, a start time, an end date and an end time.

Of course, I want the Spinners to roll the date according to its displayed granularity, e.g. in the date fields by DAY_OF_MONTH and in the time fields by MINUTE.

However, regardless to which value I set the calendarField attribute of the SpinnerDateModelS, when spinning the dates/times with the spinners, the unit is always DAY_OF_MONTH.

If I manually check the amount of change performed by getPreviousValue() and getNextValue() (which I suppose are called when someone spins the field?!), then the amount of change is correct (that means as indicated by calendarField).

How come? Where is the logic in having a field to specify the amount of change of one spin, when it is simply ignored when I actually spin the field? Ain't the getPreviousValue() and getNextValue() called by the JSpinner change listeners?

Thanks,
Matthias
.



Relevant Pages

  • Re: JSpinner + SpinnerDateModel not working as expected
    ... However, regardless to which value I set the calendarField attribute of the SpinnerDateModelS, ... If I manually check the amount of change performed by getPreviousValueand getNextValue(which ... it is simply ignored when I actually spin the field? ... getNextValuecalled by the JSpinner change listeners? ...
    (comp.lang.java.gui)
  • Re: Spannering
    ... controllable spin that I eased off for and regained grip. ... I love the amount of wet or dry grip they give for the amount of miles ... the feel and grip of the tyre doesn't deteriorate with wear. ...
    (uk.rec.motorcycles)
  • Re: Thoughts and Notes on Missile Gap by Charles Stross
    ... A little spin isn't ... Remember that the amount ... perpendicular to the plane of symmetry. ... magnetic field to counter any fluctuation from unstable ...
    (rec.arts.sf.science)
  • Re: Traction Control & ESP availability?
    ... >>> AFAIK, bmw, and all manufacturers fit a device to restrict the ... >>> amount of hp available to spin the wheels. ...
    (uk.rec.driving)
  • Re: Traction Control & ESP availability?
    ... > AFAIK, bmw, and all manufacturers fit a device to restrict the amount of ... > hp available to spin the wheels. ...
    (uk.rec.driving)