org.wilmascope.forcelayout
Class FixedOrigin
java.lang.Object
org.wilmascope.patterns.Prototype
org.wilmascope.forcelayout.Force
org.wilmascope.forcelayout.FixedOrigin
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class FixedOrigin
- extends Force
Force that attracts either one or all of the nodes to the centre of the
graph space. Simply keeps the graph centred, stops it drifting off the
screen.
- See Also:
- Serialized Form
Constructor Summary |
FixedOrigin(float strengthConstant)
|
Method Summary |
void |
calculate()
Calculate the origin centering deltas for all the nodes, or if a CentreNode
has been specified the just for that centre node. |
void |
setCentreNode(Node node)
Node specified will be drawn to the origin. |
void |
setCluster(Cluster root)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FixedOrigin
public FixedOrigin(float strengthConstant)
setCluster
public void setCluster(Cluster root)
- Specified by:
setCluster
in class Force
calculate
public void calculate()
- Calculate the origin centering deltas for all the nodes, or if a CentreNode
has been specified the just for that centre node.
- Specified by:
calculate
in class Force
setCentreNode
public void setCentreNode(Node node)
- Node specified will be drawn to the origin.
- Parameters:
node
- Node around which the graph will be centred.