Class MapControl.MapToolListener

java.lang.Object
org.gvsig.fmap.mapcontrol.MapControl.MapToolListener
All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, EventListener
Enclosing class:
MapControl

public class MapControl.MapToolListener extends Object implements MouseListener, MouseWheelListener, MouseMotionListener

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