Class CircleBehavior
java.lang.Object
org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior
org.gvsig.fmap.mapcontrol.tools.Behavior.CircleBehavior
- All Implemented Interfaces:
IBehavior
Behavior that allows user to draw a circle on the image of the associated
MapControl using a
PolylineListener.
- Author:
- Laura, Pablo Piqueras Bartolomé
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanDetermines if user setting the radius of the circle (with one click of the button 1 of the mouse), or not.protected Point2DFirst point set, that represents the center of the circle.protected Point2DSecond point set, that permits calculate the radius of the circle.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 selecting circle areas. -
Method Summary
Modifier and TypeMethodDescriptionGets theToolListenerused by this behavior to perform actions on the associatedMapControlobject.voidvoidvoidvoidvoidpaintComponent(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, mouseWheelMoved, paintComponent, resetMyButton, setMapControl, setUseSnapping
-
Field Details
-
m_FirstPoint
First point set, that represents the center of the circle. -
m_LastPoint
Second point set, that permits calculate the radius of the circle. -
isClicked
protected boolean isClickedDetermines if user setting the radius of the circle (with one click of the button 1 of the mouse), or not.
-
-
Constructor Details
-
CircleBehavior
Creates a new behavior for selecting circle areas.
- Parameters:
zili- 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:
-
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- aCircleListenerobject 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
-