org.gvsig.fmap.mapcontrol
Class MapControl.MapToolListener

java.lang.Object
  extended by 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

Constructor Summary
MapControl.MapToolListener()
           
 
Method Summary
 void mouseClicked(MouseEvent e)
           
 void mouseDragged(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void mouseWheelMoved(MouseWheelEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapControl.MapToolListener

public MapControl.MapToolListener()
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener
See Also:
MouseListener.mouseClicked(java.awt.event.MouseEvent), Behavior.mouseClicked(MouseEvent)

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener
See Also:
MouseListener.mouseEntered(java.awt.event.MouseEvent), Behavior.mouseEntered(MouseEvent)

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener
See Also:
MouseListener.mouseExited(java.awt.event.MouseEvent), Behavior.mouseExited(MouseEvent)

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener
See Also:
MouseListener.mousePressed(java.awt.event.MouseEvent), Behavior.mousePressed(MouseEvent)

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener
See Also:
MouseListener.mouseReleased(java.awt.event.MouseEvent), Behavior.mouseReleased(MouseEvent)

mouseWheelMoved

public void mouseWheelMoved(MouseWheelEvent e)
Specified by:
mouseWheelMoved in interface MouseWheelListener
See Also:
MouseWheelListener.mouseWheelMoved(java.awt.event.MouseWheelEvent), Behavior.mouseWheelMoved(MouseWheelEvent)

mouseDragged

public void mouseDragged(MouseEvent e)
Specified by:
mouseDragged in interface MouseMotionListener
See Also:
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent), Behavior.mouseDragged(MouseEvent)

mouseMoved

public void mouseMoved(MouseEvent e)
Specified by:
mouseMoved in interface MouseMotionListener
See Also:
MouseMotionListener.mouseMoved(java.awt.event.MouseEvent), Behavior.mouseMoved(MouseEvent)


Copyright © 2004-2013 gvSIG. All Rights Reserved.