A handler for spinner arrow button mouse and action events. When
a left mouse pressed event occurs we look up the (enabled) spinner
that's the source of the event and start the autorepeat timer. The
timer fires action events until any button is released at which
point the timer is stopped and the reference to the spinner cleared.
The timer doesn't start until after a 300ms delay, so often the
source of the initial (and final) action event is just the button
logic for mouse released - which means that we're relying on the fact
that our mouse listener runs after the buttons mouse listener.
Note that one instance of this handler is shared by all slider previous
arrow buttons and likewise for all of the next buttons,
so it doesn't have any state that persists beyond the limits
of a single button pressed/released gesture.
Copied from javax.swing.BasicSpinnerUI
version: $Revision: 1.4 $ See Also: javax.swing.plaf.basic.BasicSpinnerUI |