org.gvsig.fmap.mapcontrol.tools.Behavior
Class MouseMovementBehavior

java.lang.Object
  extended by org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior
      extended by org.gvsig.fmap.mapcontrol.tools.Behavior.MouseMovementBehavior
All Implemented Interfaces:
IBehavior

public class MouseMovementBehavior
extends Behavior

Behavior that permits user to move and drag the mouse on the image of the associated MapControl instance using a PointListener.

Author:
Vicente Caballero Navarro

Field Summary
protected  PointListener listener
          Tool listener used to work with the MapControl object.
 
Fields inherited from class org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior
geomManager
 
Constructor Summary
MouseMovementBehavior(PointListener mli)
          Creates a new behavior for moving or dragging the mouse on the image of the associated MapControl instance.
 
Method Summary
 ToolListener getListener()
          Gets the ToolListener used by this behavior to perform actions on the associated MapControl object.
 void mouseDragged(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void setListener(ToolListener listener)
          Sets a tool listener to work with the MapControl using this behavior.
 
Methods inherited from class org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior
createArc, createArc, createArc, createCircle, createLineString, createPoint, createPoint, getImageCursor, getMapControl, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, mouseWheelMoved, paintComponent, setMapControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listener

protected PointListener listener
Tool listener used to work with the MapControl object.

See Also:
getListener(), setListener(ToolListener)
Constructor Detail

MouseMovementBehavior

public MouseMovementBehavior(PointListener mli)

Creates a new behavior for moving or dragging the mouse on the image of the associated MapControl instance.

Parameters:
mli - listener used to permit this object to work with the associated MapControl
Method Detail

mouseDragged

public void mouseDragged(MouseEvent e)
                  throws BehaviorException
Specified by:
mouseDragged in interface IBehavior
Overrides:
mouseDragged in class Behavior
Throws:
BehaviorException - any exception processing the action associated to a mouse dragged event, by the IBehavior object
See Also:
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)

mouseMoved

public void mouseMoved(MouseEvent e)
                throws BehaviorException
Specified by:
mouseMoved in interface IBehavior
Overrides:
mouseMoved in class Behavior
Throws:
BehaviorException - any exception processing the action associated to a mouse moved event, by the IBehavior object
See Also:
MouseMotionListener.mouseMoved(java.awt.event.MouseEvent)

setListener

public void setListener(ToolListener listener)

Sets a tool listener to work with the MapControl using this behavior.

Parameters:
listener - a PointListener object for this behavior

getListener

public ToolListener getListener()
Description copied from interface: IBehavior

Gets the ToolListener used by this behavior to perform actions on the associated MapControl object.

Specified by:
getListener in interface IBehavior
Specified by:
getListener in class Behavior
Returns:
the ToolListener used by this behavior


Copyright © 2004-2013 gvSIG. All Rights Reserved.