Class MouseMovementBehavior
- All Implemented Interfaces:
IBehavior
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
FieldsModifier and TypeFieldDescriptionprotected PointListenerTool listener used to work with theMapControlobject.Fields inherited from class org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior
BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT, geomManager, LOG, LOGGER -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new behavior for moving or dragging the mouse on the image of the associatedMapControlinstance. -
Method Summary
Modifier and TypeMethodDescriptionGets theToolListenerused by this behavior to perform actions on the associatedMapControlobject.voidvoidvoidpaintComponent(MapControlDrawer mapControlDrawer) Method executed in real-time, when user is working with a tool on the associatedMapControlobject, repainting theMapControl's image.voidsetListener(ToolListener listener) Sets a tool listener to work with theMapControlusing this behavior.Methods inherited from class org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior
clean, createArc, createArc, createArc, createCircle, createEllipse, createPoint, createPoint, getImageCursor, getMapControl, getUseSnapping, isMyButton, isMyButton, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, mouseWheelMoved, paintComponent, resetMyButton, setMapControl, setUseSnapping
-
Field Details
-
listener
Tool listener used to work with theMapControlobject.- See Also:
-
-
Constructor Details
-
MouseMovementBehavior
Creates a new behavior for moving or dragging the mouse on the image of the associated
MapControlinstance.- Parameters:
mli- listener used to permit this object to work with the associatedMapControl
-
-
Method Details
-
mouseDragged
- Specified by:
mouseDraggedin interfaceIBehavior- Overrides:
mouseDraggedin classBehavior- Throws:
BehaviorException- any exception processing the action associated to a mouse dragged event, by theIBehaviorobject- See Also:
-
mouseMoved
- Specified by:
mouseMovedin interfaceIBehavior- Overrides:
mouseMovedin classBehavior- Throws:
BehaviorException- any exception processing the action associated to a mouse moved event, by theIBehaviorobject- See Also:
-
setListener
Sets a tool listener to work with the
MapControlusing this behavior.- Parameters:
listener- aPointListenerobject for this behavior
-
getListener
Description copied from interface:IBehaviorGets the
ToolListenerused by this behavior to perform actions on the associatedMapControlobject.- Specified by:
getListenerin interfaceIBehavior- Specified by:
getListenerin classBehavior- Returns:
- the
ToolListenerused by this behavior
-
paintComponent
Description copied from interface:IBehaviorMethod executed in real-time, when user is working with a tool on the associated
MapControlobject, repainting theMapControl's image.Returns immediately in all cases, even if the complete image has not yet been loaded.
This method will be implemented according to the specific nature of each behavior, and its extra and particular features.
- Specified by:
paintComponentin interfaceIBehavior- Overrides:
paintComponentin classBehavior- See Also:
-