Class MenuMouseMotionListener

  • All Implemented Interfaces:
    java.awt.event.MouseMotionListener, java.util.EventListener

    public class MenuMouseMotionListener
    extends AbstractCanvasListener
    implements java.awt.event.MouseMotionListener
    This class is meant to make the autoscrolling work better, so that you don't have to hover the mouse exactly one pixel below the menu bar to make it scroll up. This is the MouseMotionListener added to the menu bar, allowing you to scroll by just moving the mouse all the way to the top of the screen. Note: This doesn't cause it to scroll down when you reach the bottom of the menu bar, because the performAutoScrollIfActive will compare the Y coordinate to the size of the entire canvas (which should always be bigger).
    • Constructor Detail

      • MenuMouseMotionListener

        public MenuMouseMotionListener​(FreeColClient freeColClient)
        Trivial constructor.
        Parameters:
        freeColClient - The enclosing FreeColClient.
    • Method Detail

      • 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