Class RolloverButtonListener

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

    public class RolloverButtonListener
    extends javax.swing.plaf.basic.BasicButtonListener
    Button listener for rollover effects. Tracks the mouse motion and focus interaction for the associated button. This class is for internal use only.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void focusGained​(java.awt.event.FocusEvent e)  
      void focusLost​(java.awt.event.FocusEvent e)  
      void mouseClicked​(java.awt.event.MouseEvent e)  
      void mouseDragged​(java.awt.event.MouseEvent e)  
      void mouseEntered​(java.awt.event.MouseEvent e)  
      void mouseExited​(java.awt.event.MouseEvent e)  
      void mouseMoved​(java.awt.event.MouseEvent e)  
      void mousePressed​(java.awt.event.MouseEvent e)  
      void mouseReleased​(java.awt.event.MouseEvent e)  
      • Methods inherited from class javax.swing.plaf.basic.BasicButtonListener

        checkOpacity, installKeyboardActions, propertyChange, stateChanged, uninstallKeyboardActions
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • isMouseInside

        private boolean isMouseInside
        If the mouse pointer is currently inside the associated button area, this flag is true.
      • button

        private javax.swing.AbstractButton button
        The associated button.
    • Constructor Detail

      • RolloverButtonListener

        public RolloverButtonListener​(javax.swing.AbstractButton b,
                                      StateTransitionTracker stateTransitionTracker)
        Simple constructor.
        Parameters:
        b - The associated button.
    • Method Detail

      • mouseEntered

        public void mouseEntered​(java.awt.event.MouseEvent e)
        Specified by:
        mouseEntered in interface java.awt.event.MouseListener
        Overrides:
        mouseEntered in class javax.swing.plaf.basic.BasicButtonListener
      • mouseExited

        public void mouseExited​(java.awt.event.MouseEvent e)
        Specified by:
        mouseExited in interface java.awt.event.MouseListener
        Overrides:
        mouseExited in class javax.swing.plaf.basic.BasicButtonListener
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent e)
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
        Overrides:
        mouseReleased in class javax.swing.plaf.basic.BasicButtonListener
      • mouseMoved

        public void mouseMoved​(java.awt.event.MouseEvent e)
        Specified by:
        mouseMoved in interface java.awt.event.MouseMotionListener
        Overrides:
        mouseMoved in class javax.swing.plaf.basic.BasicButtonListener
      • focusGained

        public void focusGained​(java.awt.event.FocusEvent e)
        Specified by:
        focusGained in interface java.awt.event.FocusListener
        Overrides:
        focusGained in class javax.swing.plaf.basic.BasicButtonListener
      • focusLost

        public void focusLost​(java.awt.event.FocusEvent e)
        Specified by:
        focusLost in interface java.awt.event.FocusListener
        Overrides:
        focusLost in class javax.swing.plaf.basic.BasicButtonListener
      • mouseClicked

        public void mouseClicked​(java.awt.event.MouseEvent e)
        Specified by:
        mouseClicked in interface java.awt.event.MouseListener
        Overrides:
        mouseClicked in class javax.swing.plaf.basic.BasicButtonListener
      • mouseDragged

        public void mouseDragged​(java.awt.event.MouseEvent e)
        Specified by:
        mouseDragged in interface java.awt.event.MouseMotionListener
        Overrides:
        mouseDragged in class javax.swing.plaf.basic.BasicButtonListener
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent e)
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
        Overrides:
        mousePressed in class javax.swing.plaf.basic.BasicButtonListener