|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wilmascope.patterns.Prototype
org.wilmascope.forcelayout.Force
org.wilmascope.forcelayout.Spring
public class Spring
A Force for use by nodes connected by an edge.
Attempts to restore the distance between nodes to the natural length of that edge.
| Field Summary |
|---|
| Fields inherited from class org.wilmascope.forcelayout.Force |
|---|
strengthConstant |
| Constructor Summary | |
|---|---|
Spring(float strengthConstant)
Creates a new Spring with the given strength |
|
| Method Summary | |
|---|---|
void |
calculate()
Calculate node deltas due to spring forces between all nodes connected by an edge |
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 |
|---|
public Spring(float strengthConstant)
Spring with the given strength
strengthConstant - k in Hooke's Law| Method Detail |
|---|
public void setCluster(Cluster root)
setCluster in class Forcepublic void calculate()
calculate in class Force
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||