|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gvsig.fmap.mapcontrol.tools.Behavior.Behavior
org.gvsig.fmap.mapcontrol.tools.Behavior.CircleBehavior
public class CircleBehavior
Behavior that allows user to draw a circle on the image of the associated
MapControl using a PolylineListener.
| Field Summary | |
|---|---|
protected boolean |
isClicked
Determines if user setting the radius of the circle (with one click of the button 1 of the mouse), or not. |
protected Point2D |
m_FirstPoint
First point set, that represents the center of the circle. |
protected Point2D |
m_LastPoint
Second point set, that permits calculate the radius of the circle. |
| Fields inherited from class org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior |
|---|
geomManager |
| Constructor Summary | |
|---|---|
CircleBehavior(CircleListener zili)
Creates a new behavior for selecting circle areas. |
|
| 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 |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
paintComponent(MapControlDrawer mapControlDrawer)
Method executed in real-time, when user is working with a tool on the associated MapControl
object, repainting the MapControl's image. |
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, mouseWheelMoved, setMapControl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Point2D m_FirstPoint
protected Point2D m_LastPoint
protected boolean isClicked
| Constructor Detail |
|---|
public CircleBehavior(CircleListener zili)
Creates a new behavior for selecting circle areas.
zili - listener used to permit this object to work with the associated MapControl| Method Detail |
|---|
public void paintComponent(MapControlDrawer mapControlDrawer)
IBehaviorMethod executed in real-time, when user is working with a tool on the associated MapControl
object, repainting the MapControl'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.
paintComponent in interface IBehaviorpaintComponent in class BehaviorGraphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver)public void mousePressed(MouseEvent e)
mousePressed in interface IBehaviormousePressed in class BehaviorMouseListener.mousePressed(java.awt.event.MouseEvent)
public void mouseReleased(MouseEvent e)
throws BehaviorException
mouseReleased in interface IBehaviormouseReleased in class BehaviorBehaviorException - any exception processing the action associated to a mouse released event, by the IBehavior objectMouseListener.mouseReleased(java.awt.event.MouseEvent)
public void mouseDragged(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(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 CircleListener object for this behaviorpublic 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 behavior
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||