com.touchgraph.graphlayout
Class TGLayout

java.lang.Object
  extended by com.touchgraph.graphlayout.TGLayout
All Implemented Interfaces:
Runnable

public class TGLayout
extends Object
implements 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 open source.


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

Includes several enhancements from v1.22. (altheim)

Version:
1.21 $Id: TGLayout.java,v 3.5 2005/04/03 01:55:16 altheim Exp $
Author:
Alexander Shapiro

Constructor Summary
TGLayout(TGPanel tgp)
          Constructor with a supplied TGPanel tgp.
 
Method Summary
 void damp()
           
 void resetDamper()
           
 void run()
           
 void start()
           
 void startDamper()
           
 void stop()
           
 void stopDamper()
           
 void stopMotion()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TGLayout

public TGLayout(TGPanel tgp)
Constructor with a supplied TGPanel tgp.

Method Detail

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 Runnable

start

public void start()

stop

public void stop()


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.