org.wilmascope.forcelayout
Class DirectedField

java.lang.Object
  extended by org.wilmascope.patterns.Prototype
      extended by org.wilmascope.forcelayout.Force
          extended by org.wilmascope.forcelayout.DirectedField
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class DirectedField
extends Force

A force field that will force all directed edges to align themselves with its direction vector

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.wilmascope.forcelayout.Force
strengthConstant
 
Constructor Summary
DirectedField(float strengthConstant)
           
DirectedField(float strengthConstant, javax.vecmath.Vector3f vector)
           
 
Method Summary
 void calculate()
          calculate the deltas to apply to the node positions due to the effects of this force
 void setCluster(Cluster root)
           
 
Methods inherited from class org.wilmascope.forcelayout.Force
getStrengthConstant, setStrengthConstant, toString
 
Methods inherited from class org.wilmascope.patterns.Prototype
clone, getTypeName, setTypeName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectedField

public DirectedField(float strengthConstant,
                     javax.vecmath.Vector3f vector)

DirectedField

public DirectedField(float strengthConstant)
Method Detail

setCluster

public void setCluster(Cluster root)
Specified by:
setCluster in class Force

calculate

public void calculate()
calculate the deltas to apply to the node positions due to the effects of this force

Specified by:
calculate in class Force
Parameters:
edges - the list of edges to which this force is to be applied