edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction
Class DragNodeUI

java.lang.Object
  extended by edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction.TGUserInterface
      extended by edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction.TGSelfDeactivatingUI
          extended by edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction.TGAbstractDragUI
              extended by edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction.DragNodeUI

public class DragNodeUI
extends TGAbstractDragUI

DragNodeUI contains code for dragging nodes.

Parts of this code build upon Sun's Graph Layout example. http://java.sun.com/applets/jdk/1.1/demo/GraphLayout/Graph.java

Version:
1.22-jre1.1 $Id: DragNodeUI.java,v 1.1 2010/01/20 20:38:32 jiecui Exp $
Author:
Alexander Shapiro

Field Summary
 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.
 
Fields inherited from class edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction.TGAbstractDragUI
mouseWasDragged, tgPanel
 
Constructor Summary
DragNodeUI(TGPanel tgp)
          Constructor with TGPanel tgp.
 
Method Summary
 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()
           
 
Methods inherited from class edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction.TGAbstractDragUI
activate, activate, deactivate
 
Methods inherited from class edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction.TGSelfDeactivatingUI
setSelfDeactivate
 
Methods inherited from class edu.ucla.stat.SOCR.touchgraph.graphlayout.interaction.TGUserInterface
activate, isActive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dragOffs

public 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.

Constructor Detail

DragNodeUI

public DragNodeUI(TGPanel tgp)
Constructor with TGPanel tgp.

Method Detail

preActivate

public void preActivate()
Specified by:
preActivate in class TGAbstractDragUI

preDeactivate

public void preDeactivate()
Specified by:
preDeactivate in class TGAbstractDragUI

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in class TGAbstractDragUI

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in class TGAbstractDragUI

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in class TGAbstractDragUI