public class TwoLinesBehavior extends PointBehavior
| Modifier and Type | Field and Description |
|---|---|
protected java.awt.geom.Point2D |
cuadrantPoint |
protected boolean |
isClicked |
protected AngleListener |
listener |
BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT, geomManager, LOG, LOGGER| Constructor and Description |
|---|
TwoLinesBehavior(AngleListener mli) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
changeLastPoint(java.awt.Point p) |
protected void |
drawPolyline(MapControlDrawer mapControlDrawer,
org.gvsig.fmap.geom.primitive.Curve curve) |
ToolListener |
getListener()
Gets the
ToolListener used by this behavior to perform actions on the
associated MapControl object. |
protected java.util.List<org.gvsig.fmap.geom.aggregate.MultiLine> |
getPossibleGeometriesFromLayers(org.gvsig.fmap.geom.primitive.Point mapPoint) |
org.gvsig.fmap.geom.primitive.Line |
getSegmentFrom(org.gvsig.fmap.geom.primitive.Point mapPoint) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.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. |
protected void |
processEvent(PointEvent event) |
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, mouseEntered, mouseExited, mouseWheelMoved, paintComponent, resetMyButton, setMapControl, setUseSnappingprotected java.awt.geom.Point2D cuadrantPoint
protected boolean isClicked
protected AngleListener listener
public TwoLinesBehavior(AngleListener mli)
protected void changeLastPoint(java.awt.Point p)
protected void drawPolyline(MapControlDrawer mapControlDrawer, org.gvsig.fmap.geom.primitive.Curve curve)
public ToolListener getListener()
IBehaviorGets the ToolListener used by this behavior to perform actions on the
associated MapControl object.
getListener in interface IBehaviorgetListener in class PointBehaviorToolListener used by this behaviorprotected java.util.List<org.gvsig.fmap.geom.aggregate.MultiLine> getPossibleGeometriesFromLayers(org.gvsig.fmap.geom.primitive.Point mapPoint)
public org.gvsig.fmap.geom.primitive.Line getSegmentFrom(org.gvsig.fmap.geom.primitive.Point mapPoint)
throws BehaviorException
BehaviorExceptionpublic void mouseDragged(java.awt.event.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(java.awt.event.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 mousePressed(java.awt.event.MouseEvent e)
throws BehaviorException
mousePressed in interface IBehaviormousePressed in class PointBehaviorBehaviorException - any exception processing the action associated to a mouse pressed event, by the IBehavior objectMouseListener.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 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)protected void processEvent(PointEvent event) throws BehaviorException
BehaviorExceptionpublic void setListener(ToolListener listener)
PointBehaviorSets a tool listener to work with the MapControl using this behavior.
setListener in class PointBehaviorlistener - a PointListener object for this behaviorCopyright © 2026 gvSIG Association. All rights reserved.