|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectEDU.utwente.CoCompose.algorithm.ModelSpring
Model layout algorithm adapted from the EDU.auburn.VGJ.algorithm.shawn.Spring algorithm to cope with CoCompose models. Class to implement Kamada and Kawai's spring algorithm with modifications.
Spring
Constructor Summary | |
ModelSpring()
Constructs a ModelSpring. |
Method Summary | |
java.lang.String |
compute(Graph G,
GraphUpdate update)
Do not use. |
protected boolean |
doPass()
Does one algorithm pass. |
void |
run()
Runs the algorithm. |
void |
start(Graph G,
GraphUpdate update)
Starts the ModelSpring algorithm and runs it continuously in the background until the stop method is called. |
void |
stop()
Stops the ModelSpring algorithm. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ModelSpring()
Method Detail |
protected boolean doPass() throws java.lang.Exception
java.lang.Exception
- if anything goes wrong, which happens if the model
changes.public java.lang.String compute(Graph G, GraphUpdate update)
compute
in interface GraphAlgorithm
G
- The graph to apply this algorithm to.update
- The updatable graph display.
GraphUpdate
public void start(Graph G, GraphUpdate update) throws CoComposeException
G
- The graph to apply this algorithm to.update
- The updatable graph display.
CoComposeException
- if there was an error applying the algorithm.public void stop()
public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |