Package diva.graph
Class NodeDragInteractor
- java.lang.Object
-
- diva.canvas.interactor.AbstractInteractor
-
- diva.canvas.interactor.DragInteractor
-
- diva.graph.NodeDragInteractor
-
- All Implemented Interfaces:
LayerListener
,LayerMotionListener
,Interactor
,java.util.EventListener
- Direct Known Subclasses:
LocatableNodeDragInteractor
public class NodeDragInteractor extends DragInteractor
An interactor that drags nodes.- Version:
- $Id$
- Author:
- Michael Shilman, John Reekie
- Pt.AcceptedRating:
- Red
-
-
Constructor Summary
Constructors Constructor Description NodeDragInteractor(GraphController controller)
Create a new NodeDragInteractor and give it a pointer to its controller to it can find other useful objects
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphController
getController()
Return the controller set in the constructor.void
translate(LayerEvent e, double x, double y)
Drag all selected nodes and move any attached edges-
Methods inherited from class diva.canvas.interactor.DragInteractor
addLayerListener, appendConstraint, constrainPoint, fireLayerEvent, getSelectiveEnabled, getTargetArray, getX, getY, mouseDragged, mousePressed, mouseReleased, prependConstraint, removeLayerListener, setSelectiveEnabled, setTargetArray, setup, targets
-
Methods inherited from class diva.canvas.interactor.AbstractInteractor
accept, getMouseFilter, isConsuming, isEnabled, isMotionEnabled, mouseClicked, mouseEntered, mouseExited, mouseMoved, setConsuming, setEnabled, setMotionEnabled, setMouseFilter
-
-
-
-
Constructor Detail
-
NodeDragInteractor
public NodeDragInteractor(GraphController controller)
Create a new NodeDragInteractor and give it a pointer to its controller to it can find other useful objects
-
-
Method Detail
-
getController
public GraphController getController()
Return the controller set in the constructor.- Returns:
- The controller.
-
translate
public void translate(LayerEvent e, double x, double y)
Drag all selected nodes and move any attached edges- Overrides:
translate
in classDragInteractor
- Parameters:
e
- The eventx
- the x distancey
- the y distance
-
-