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.
| Modifier and Type | Field and Description |
|---|---|
protected PointListener |
listener
Tool listener used to work with the
MapControl object. |
geomManager| Constructor and Description |
|---|
MouseMovementBehavior(PointListener mli)
Creates a new behavior for moving or dragging the mouse on the image of the associated
MapControl instance. |
| Modifier and Type | Method and Description |
|---|---|
ToolListener |
getListener()
Gets the
ToolListener used by this behavior to perform actions on the
associated MapControl object. |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
setListener(ToolListener listener)
Sets a tool listener to work with the
MapControl using this behavior. |
createArc, createArc, createArc, createCircle, createLineString, createPoint, createPoint, getImageCursor, getMapControl, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, mouseWheelMoved, paintComponent, setMapControlprotected PointListener listener
MapControl object.getListener(),
setListener(ToolListener)public MouseMovementBehavior(PointListener mli)
Creates a new behavior for moving or dragging the mouse on the image of the associated MapControl instance.
mli - listener used to permit this object to work with the associated MapControlpublic ToolListener getListener()
IBehaviorGets the ToolListener used by this behavior to perform actions on the
associated MapControl object.
getListener in interface IBehaviorgetListener in class BehaviorToolListener used by this behaviorpublic void mouseDragged(java.awt.event.MouseEvent e)
throws BehaviorException
mouseDragged in interface IBehaviormouseDragged in class BehaviorBehaviorException - any exception processing the action associated to a mouse dragged event, by the IBehavior objectMouseMotionListener.mouseDragged(java.awt.event.MouseEvent)public void mouseMoved(java.awt.event.MouseEvent e)
throws BehaviorException
mouseMoved in interface IBehaviormouseMoved in class BehaviorBehaviorException - any exception processing the action associated to a mouse moved event, by the IBehavior objectMouseMotionListener.mouseMoved(java.awt.event.MouseEvent)public void setListener(ToolListener listener)
Sets a tool listener to work with the MapControl using this behavior.
listener - a PointListener object for this behaviorCopyright © 2013 gvSIG Association. All Rights Reserved.