Package net.sf.freecol.client.gui.menu
Class MenuMouseMotionListener
- java.lang.Object
-
- net.sf.freecol.client.control.FreeColClientHolder
-
- net.sf.freecol.client.gui.AbstractCanvasListener
-
- net.sf.freecol.client.gui.menu.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).
-
-
Field Summary
-
Fields inherited from class net.sf.freecol.client.gui.AbstractCanvasListener
AUTO_SCROLL_SPACE
-
-
Constructor Summary
Constructors Constructor Description MenuMouseMotionListener(FreeColClient freeColClient)
Trivial constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
mouseDragged(java.awt.event.MouseEvent e)
void
mouseMoved(java.awt.event.MouseEvent e)
-
Methods inherited from class net.sf.freecol.client.gui.AbstractCanvasListener
performAutoScrollIfActive, performDragScrollIfActive, stopScrollIfScrollIsActive
-
Methods inherited from class net.sf.freecol.client.control.FreeColClientHolder
askServer, currentPlayerIsMyPlayer, getClientOptions, getConnectController, getFreeColClient, getFreeColServer, getGame, getGUI, getMap, getMyPlayer, getSpecification, igc, pgc
-
-
-
-
Constructor Detail
-
MenuMouseMotionListener
public MenuMouseMotionListener(FreeColClient freeColClient)
Trivial constructor.- Parameters:
freeColClient
- The enclosingFreeColClient
.
-
-