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 |
|---|---|
java.awt.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(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
preActivate() |
void |
preDeactivate() |
activate, activate, deactivatesetSelfDeactivateactivate, isActivepublic java.awt.Point dragOffs
public DragNodeUI(TGPanel tgp)
public void preActivate()
preActivate in class TGAbstractDragUIpublic void preDeactivate()
preDeactivate in class TGAbstractDragUIpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in class TGAbstractDragUIpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in class TGAbstractDragUIpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in class TGAbstractDragUI