Home » openjdk-7 » javax » swing » plaf » basic » [javadoc | source]
static class: BasicSpinnerUI.ArrowButtonHandler [javadoc | source]

All Implemented Interfaces:
    MouseListener, FocusListener, UIResource, Action, Cloneable, Serializable

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.
Field Summary
final  Timer autoRepeatTimer     
final  boolean isNext     
 JSpinner spinner     
 JButton arrowButton     
Fields inherited from javax.swing.AbstractAction:
enabled,  changeSupport
 ArrowButtonHandler(String name,
    boolean isNext) 
Method from javax.swing.plaf.basic.BasicSpinnerUI$ArrowButtonHandler Summary:
actionPerformed,   focusGained,   focusLost,   mouseClicked,   mouseEntered,   mouseExited,   mousePressed,   mouseReleased
Methods from javax.swing.AbstractAction:
addPropertyChangeListener,   clone,   firePropertyChange,   getKeys,   getPropertyChangeListeners,   getValue,   hasSelectedKey,   isEnabled,   isSelected,   putValue,   removePropertyChangeListener,   setEnabled,   setEnabledFromAction,   setToolTipTextFromAction,   shouldReconfigure
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.plaf.basic.BasicSpinnerUI$ArrowButtonHandler Detail:
 public  void actionPerformed(ActionEvent e) 
 public  void focusGained(FocusEvent e) 
 public  void focusLost(FocusEvent e) 
 public  void mouseClicked(MouseEvent e) 
 public  void mouseEntered(MouseEvent e) 
 public  void mouseExited(MouseEvent e) 
 public  void mousePressed(MouseEvent e) 
 public  void mouseReleased(MouseEvent e)