Package net.sf.freecol.client.gui
Class CanvasMapEditorMouseListener
- java.lang.Object
-
- net.sf.freecol.client.control.FreeColClientHolder
-
- net.sf.freecol.client.gui.AbstractCanvasListener
-
- net.sf.freecol.client.gui.CanvasMapEditorMouseListener
-
- All Implemented Interfaces:
java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.util.EventListener
public final class CanvasMapEditorMouseListener extends AbstractCanvasListener implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
Listens to the mouse being moved at the level of the Canvas.
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Point
endPoint
private static java.util.logging.Logger
logger
private java.awt.Point
startPoint
-
Fields inherited from class net.sf.freecol.client.gui.AbstractCanvasListener
AUTO_SCROLL_SPACE
-
-
Constructor Summary
Constructors Constructor Description CanvasMapEditorMouseListener(FreeColClient freeColClient)
The constructor to use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
drawBox(javax.swing.JComponent component, java.awt.Point startPoint, java.awt.Point endPoint)
Draw a box on screen.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 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
-
CanvasMapEditorMouseListener
public CanvasMapEditorMouseListener(FreeColClient freeColClient)
The constructor to use.- Parameters:
freeColClient
- The enclosingFreeColClient
.
-
-
Method Detail
-
drawBox
private void drawBox(javax.swing.JComponent component, java.awt.Point startPoint, java.awt.Point endPoint)
Draw a box on screen.- Parameters:
component
- TheJComponent
to draw on.startPoint
- The startingPoint
.endPoint
- The endPoint
.
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMoved
in interfacejava.awt.event.MouseMotionListener
-
-