edu.ucla.stat.SOCR.touchgraph.graphlayout
Class TGLayout
java.lang.Object
edu.ucla.stat.SOCR.touchgraph.graphlayout.TGLayout
- All Implemented Interfaces:
- java.lang.Runnable
public class TGLayout
- extends java.lang.Object
- implements java.lang.Runnable
TGLayout is the thread responsible for graph layout. It updates
the real coordinates of the nodes in the graphEltSet object.
TGPanel sends it resetDamper commands whenever the layout needs
to be adjusted. After every adjustment cycle, TGLayout triggers
a repaint of the TGPanel.
********************************************************************
This is the heart of the TouchGraph application. Please provide a
Reference to TouchGraph.com if you are influenced by what you see
below. Your cooperation will insure that this code remains
opensource
********************************************************************
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: TGLayout.java,v 1.1 2010/01/20 20:38:32 jiecui Exp $
- Author:
- Alexander Shapiro
Constructor Summary |
TGLayout(TGPanel tgp)
Constructor with a supplied TGPanel tgp. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TGLayout
public TGLayout(TGPanel tgp)
- Constructor with a supplied TGPanel tgp.
startDamper
public void startDamper()
stopDamper
public void stopDamper()
resetDamper
public void resetDamper()
stopMotion
public void stopMotion()
damp
public void damp()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
start
public void start()
stop
public void stop()