Class BasicCommandButtonListener

  • All Implemented Interfaces:
    java.awt.event.FocusListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, javax.swing.event.ChangeListener

    public class BasicCommandButtonListener
    extends java.lang.Object
    implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.FocusListener, javax.swing.event.ChangeListener
    Listener to track user interaction with the command buttons.
    • Constructor Detail

      • BasicCommandButtonListener

        public BasicCommandButtonListener()
    • Method Detail

      • focusLost

        public void focusLost​(java.awt.event.FocusEvent e)
        Specified by:
        focusLost in interface java.awt.event.FocusListener
      • focusGained

        public void focusGained​(java.awt.event.FocusEvent e)
        Specified by:
        focusGained in interface java.awt.event.FocusListener
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent e)
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent e)
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
      • mouseClicked

        public void mouseClicked​(java.awt.event.MouseEvent e)
        Specified by:
        mouseClicked in interface java.awt.event.MouseListener
      • mouseDragged

        public void mouseDragged​(java.awt.event.MouseEvent e)
        Specified by:
        mouseDragged in interface java.awt.event.MouseMotionListener
      • mouseMoved

        public void mouseMoved​(java.awt.event.MouseEvent e)
        Specified by:
        mouseMoved in interface java.awt.event.MouseMotionListener
      • mouseEntered

        public void mouseEntered​(java.awt.event.MouseEvent e)
        Specified by:
        mouseEntered in interface java.awt.event.MouseListener
      • syncMouseMovement

        private void syncMouseMovement​(java.awt.event.MouseEvent e)
        Synchronizes the action and popup models of the command button with the specified mouse event.
        Parameters:
        e - Mouse event for the model synchronization.
      • mouseExited

        public void mouseExited​(java.awt.event.MouseEvent e)
        Specified by:
        mouseExited in interface java.awt.event.MouseListener
      • stateChanged

        public void stateChanged​(javax.swing.event.ChangeEvent e)
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener
      • installKeyboardActions

        public void installKeyboardActions​(JCommandButton button)
        Installs keyboard action (space / enter keys) on the specified command button.
        Parameters:
        button - Command button.
      • uninstallKeyboardActions

        public void uninstallKeyboardActions​(JCommandButton button)
        Uninstalls keyboard action from the specified command button.
        Parameters:
        button - Command button.