Class DraggerBehavior
java.lang.Object
org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior
org.gvsig.fmap.mapcontrol.tools.Behavior.DraggerBehavior
- All Implemented Interfaces:
IBehavior
Behavior that permits user to drag the image of the associated
MapControl using a PanListener.
- Author:
- Vicente Caballero Navarro, Pablo Piqueras Bartolomé
-
Field Summary
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 dragging the mouse. -
Method Summary
Modifier and TypeMethodDescriptionGets theToolListenerused by this behavior to perform actions on the associatedMapControlobject.voidvoidvoidvoidpaintComponent(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, mouseMoved, mouseWheelMoved, paintComponent, resetMyButton, setMapControl, setUseSnapping
-
Constructor Details
-
DraggerBehavior
Creates a new behavior for dragging the mouse.
- Parameters:
pli- listener used to permit this object to work with the associatedMapControl
-
-
Method Details
-
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:
-
mousePressed
- Specified by:
mousePressedin interfaceIBehavior- Overrides:
mousePressedin classBehavior- See Also:
-
mouseReleased
- Specified by:
mouseReleasedin interfaceIBehavior- Overrides:
mouseReleasedin classBehavior- Throws:
BehaviorException- any exception processing the action associated to a mouse released event, by theIBehaviorobject- See Also:
-
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:
-
setListener
Sets a tool listener to work with the
MapControlusing this behavior.- Parameters:
listener- aPanListenerobject 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
-