com.touchgraph.graphlayout.interaction
public class DragNodeUI extends TGAbstractDragUI
Parts of this code build upon Sun's Graph Layout example. http://java.sun.com/applets/jdk/1.1/demo/GraphLayout/Graph.java
Modifier and Type | Field and Description |
---|---|
Point |
dragOffs
Stores the distance between the cursor and the center of the node
when dragging occurs so that the cursor remains at the same position
on the node otherwise, the cursor jumps to the center of the node.
|
mouseWasDragged, tgPanel
Constructor and Description |
---|
DragNodeUI(TGPanel tgp)
Constructor with TGPanel tgp.
|
Modifier and Type | Method and Description |
---|---|
void |
mouseDragged(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
void |
preActivate() |
void |
preDeactivate() |
activate, activate, deactivate
setSelfDeactivate
activate, isActive
public Point dragOffs
public DragNodeUI(TGPanel tgp)
public void preActivate()
preActivate
in class TGAbstractDragUI
public void preDeactivate()
preDeactivate
in class TGAbstractDragUI
public void mousePressed(MouseEvent e)
mousePressed
in class TGAbstractDragUI
public void mouseReleased(MouseEvent e)
mouseReleased
in class TGAbstractDragUI
public void mouseDragged(MouseEvent e)
mouseDragged
in class TGAbstractDragUI