Class MapControl.MapToolListener
- All Implemented Interfaces:
MouseListener,MouseMotionListener,MouseWheelListener,EventListener
- Enclosing class:
MapControl
Listens all kind of mouse events produced in MapControl, and invokes its current map tool (
MapControl#getCurrentMapTool()
to simulate a behavior.
Mouse wheel moved events produce a zoom in operation if wheel rotation is negative, or a zoom out if its positive. Both will be centered in the position of the mouse, but, meanwhile zoom in operation applies a factor of 0.9, zoom out operation applies a factor of 1.2
Mouse wheel moved events can be produced as much frequently, that between each one, the drawing process could hadn't finished. This is the reason that, in this situation, cancels always the previous drawing process before applying a zoom operation, and ignores all new mouse positions that are produced before 1 second.
- Author:
- Fernando Gonz�lez Cort�s
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidvoidvoid
-
Constructor Details
-
MapToolListener
public MapToolListener()
-
-
Method Details
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener- See Also:
-
mouseEntered
- Specified by:
mouseEnteredin interfaceMouseListener- See Also:
-
mouseExited
- Specified by:
mouseExitedin interfaceMouseListener- See Also:
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener- See Also:
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener- See Also:
-
mouseWheelMoved
- Specified by:
mouseWheelMovedin interfaceMouseWheelListener- See Also:
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener- See Also:
-
mouseMoved
- Specified by:
mouseMovedin interfaceMouseMotionListener- See Also:
-