net.sf.freecol.client.gui
Class CanvasMouseMotionListener
java.lang.Object
net.sf.freecol.client.gui.CanvasMouseMotionListener
- All Implemented Interfaces:
- java.awt.event.MouseMotionListener, java.util.EventListener
public final class CanvasMouseMotionListener
- extends java.lang.Object
- implements java.awt.event.MouseMotionListener
Listens to the mouse being moved at the level of the Canvas.
|
Method Summary |
private void |
auto_scroll(int x,
int y)
|
private void |
drag_scroll(int x,
int y)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
Invoked when the mouse has been dragged. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Invoked when the mouse has been moved. |
private void |
scroll(int x,
int y,
int scrollspace)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final java.util.logging.Logger logger
lastTile
private Tile lastTile
canvas
private final Canvas canvas
gui
private final GUI gui
map
private final Map map
scrollThread
private CanvasMouseMotionListener.ScrollThread scrollThread
DRAG_SCROLLSPACE
private static final int DRAG_SCROLLSPACE
- See Also:
- Constant Field Values
AUTO_SCROLLSPACE
private static final int AUTO_SCROLLSPACE
- See Also:
- Constant Field Values
CanvasMouseMotionListener
public CanvasMouseMotionListener(Canvas canvas,
GUI g,
Map m)
- The constructor to use.
- Parameters:
canvas - The component this object gets created for.g - The GUI that holds information such as screen resolution.m - The Map that is currently being drawn on the Canvas (by the
GUI).
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Invoked when the mouse has been moved.
- Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
- Parameters:
e - The MouseEvent that holds all the information.
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Invoked when the mouse has been dragged.
- Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
- Parameters:
e - The MouseEvent that holds all the information.
auto_scroll
private void auto_scroll(int x,
int y)
drag_scroll
private void drag_scroll(int x,
int y)
scroll
private void scroll(int x,
int y,
int scrollspace)