org.wilmascope.fastlayout
Class FastLayout

java.lang.Object
  extended by org.wilmascope.graph.LayoutEngine
      extended by org.wilmascope.fastlayout.FastLayout

public class FastLayout
extends LayoutEngine

Title: FastLayout Description: Wilma layout engine implementing a linear time fast force directed placement algorithm

Version:
1.1
Author:
James Cowling

Constructor Summary
FastLayout()
           
 
Method Summary
 boolean applyLayout()
          apply the changes calculated by LayoutEngine.calculateLayout()
 void calculateLayout()
          calculate the changes required to move the graph to a nicer layout.
 EdgeLayout createEdgeLayout(Edge e)
          Factory method to create a new EdgeLayout implementation compatible with the layout engine implementing this interface.
 NodeLayout createNodeLayout(Node n)
          Factory method to create a new NodeLayout implementation compatible with the layout engine implementing this interface.
 void flattenGraph()
           
 javax.swing.JPanel getControls()
           
 int getIterations()
           
 java.lang.String getName()
          Return a string descriptor for the layout engine type.
 java.lang.String getPhase()
           
 DensityMatrix getUniverse()
           
 void init(Cluster root)
          The LayoutEngine should have no constructor.
 void reset()
           
 void resetProperties()
          process your custom properties by overriding this method, but, again call super.resetProperties in your overriding implementation
 void setAttract(int val)
           
 void setBoilBarrier(boolean val)
           
 void setBoilJump(int val)
           
 void setBoilLen(double val)
           
 void setCentreFlag(boolean val)
           
 void setColourFlag(boolean val)
           
 void setEyeCandyFlag(boolean val)
           
 void setIterations(int val)
           
 void setMaxBarrier(double val)
           
 void setMinBarrier(double val)
           
 void setNaive(boolean val)
           
 void setQuenchLen(double val)
           
 void setRadius(int val)
           
 void setRepel(int val)
           
 void setSimmerRate(double val)
           
 void setThreeD(boolean threeD)
           
 double systemEnergy()
           
 
Methods inherited from class org.wilmascope.graph.LayoutEngine
getProperties, getRoot, isIterative, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastLayout

public FastLayout()
Method Detail

calculateLayout

public void calculateLayout()
Description copied from class: LayoutEngine
calculate the changes required to move the graph to a nicer layout. This method does not actually update the position of the nodes, rather this should be done by the LayoutEngine.applyLayout() method. Potentially, this means that the caller can calculate new positions (stored in the NodeLayouts), then opt not to apply the changes if it does not lead to an improvement. In practice this has not yet been utilised and such decisions are usually made internally to the layout engine.

Overrides:
calculateLayout in class LayoutEngine

applyLayout

public boolean applyLayout()
Description copied from class: LayoutEngine
apply the changes calculated by LayoutEngine.calculateLayout()

Specified by:
applyLayout in class LayoutEngine
Returns:
true when a stable state is reached

getIterations

public int getIterations()

getPhase

public java.lang.String getPhase()

systemEnergy

public double systemEnergy()

flattenGraph

public void flattenGraph()

setIterations

public void setIterations(int val)

setAttract

public void setAttract(int val)

setRepel

public void setRepel(int val)

setBoilJump

public void setBoilJump(int val)

setRadius

public void setRadius(int val)

setSimmerRate

public void setSimmerRate(double val)

setBoilLen

public void setBoilLen(double val)

setQuenchLen

public void setQuenchLen(double val)

setMinBarrier

public void setMinBarrier(double val)

setMaxBarrier

public void setMaxBarrier(double val)

setCentreFlag

public void setCentreFlag(boolean val)

setNaive

public void setNaive(boolean val)

setBoilBarrier

public void setBoilBarrier(boolean val)

setColourFlag

public void setColourFlag(boolean val)

setEyeCandyFlag

public void setEyeCandyFlag(boolean val)

reset

public void reset()

getUniverse

public DensityMatrix getUniverse()

createNodeLayout

public NodeLayout createNodeLayout(Node n)
Description copied from class: LayoutEngine
Factory method to create a new NodeLayout implementation compatible with the layout engine implementing this interface.

Specified by:
createNodeLayout in class LayoutEngine

createEdgeLayout

public EdgeLayout createEdgeLayout(Edge e)
Description copied from class: LayoutEngine
Factory method to create a new EdgeLayout implementation compatible with the layout engine implementing this interface.

Specified by:
createEdgeLayout in class LayoutEngine

getControls

public javax.swing.JPanel getControls()
Specified by:
getControls in class LayoutEngine

getName

public java.lang.String getName()
Description copied from class: LayoutEngine
Return a string descriptor for the layout engine type. Useful in GUI elements such as comboboxes

Specified by:
getName in class LayoutEngine

init

public void init(Cluster root)
Description copied from class: LayoutEngine
The LayoutEngine should have no constructor. It should be initialised with this method.

Overrides:
init in class LayoutEngine

setThreeD

public void setThreeD(boolean threeD)

resetProperties

public void resetProperties()
Description copied from class: LayoutEngine
process your custom properties by overriding this method, but, again call super.resetProperties in your overriding implementation

Overrides:
resetProperties in class LayoutEngine