org.wilmascope.forcelayout
Class Repulsion

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

public class Repulsion
extends Force

A repulsive (electrostatic style) force between all nodes.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.wilmascope.forcelayout.Force
strengthConstant
 
Constructor Summary
Repulsion(float strengthConstant, float limitRadius)
           
 
Method Summary
 void calculate()
          Calculate deltas for the repulsive (electrostatic) forces between all nodes
 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

Repulsion

public Repulsion(float strengthConstant,
                 float limitRadius)
Method Detail

setCluster

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

calculate

public void calculate()
Calculate deltas for the repulsive (electrostatic) forces between all nodes

Specified by:
calculate in class Force
Parameters:
nodes - The nodes to which this force applies
edges - Not used in this method (here to match the interface)