public class PointBehavior extends Behavior
Behavior that permits user to select a point with a double click mouse action, on the associated
MapControl using a PointListener.
BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT, geomManager, LOG| Constructor and Description |
|---|
PointBehavior(PointListener l) |
PointBehavior(PointListener l,
int mouseButton)
Creates a new behavior for selecting a point.
|
| Modifier and Type | Method and Description |
|---|---|
ToolListener |
getListener()
Gets the
ToolListener used by this behavior to perform actions on the
associated MapControl object. |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
setListener(ToolListener listener)
Sets a tool listener to work with the
MapControl using this behavior. |
clean, createArc, createArc, createArc, createCircle, createEllipse, createPoint, createPoint, getImageCursor, getMapControl, getUseSnapping, isMyButton, isMyButton, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved, paintComponent, paintComponent, resetMyButton, setMapControl, setUseSnappingpublic PointBehavior(PointListener l, int mouseButton)
Creates a new behavior for selecting a point.
l - listener used to permit this object to work with the associated MapControlpublic PointBehavior(PointListener l)
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface IBehaviormousePressed in class BehaviorMouseListener.mousePressed(java.awt.event.MouseEvent)public void mouseReleased(java.awt.event.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 setListener(ToolListener listener)
Sets a tool listener to work with the MapControl using this behavior.
listener - a PointListener 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