Package org.graffiti.plugin.algorithm
Interface AnimatedAlgorithm
- All Superinterfaces:
Algorithm
- All Known Implementing Classes:
AbstractAnimatedAlgorithm
public interface AnimatedAlgorithm extends Algorithm
An
AnimatedAlgorithm
provides the possibility to execute the
underlying algorithm in steps, so that the intermediate results can be seen.
It still provides a way to execute the whole algorithm as one big step, as if
it was a 'normal' Algorithm
.- Version:
- $Revision: 1.4 $
- See Also:
Algorithm
-
Method Summary
Modifier and Type Method Description void
animate(Graph g)
Starts the animation of the algorithm.void
execute(Graph g)
Executes the whole algorithm as one big step.boolean
isFinished()
Returnstrue
if the algorithm has another step (that means thatnextStep()
will not throw an Exception).void
nextStep()
Executes the next step of the algorithm.Methods inherited from interface org.graffiti.plugin.algorithm.Algorithm
attach, check, execute, getAcceleratorKeyStroke, getActionEvent, getCategory, getDescription, getMenuCategory, getName, getParameters, getSetCategory, isLayoutAlgorithm, mayWorkOnMultipleGraphs, reset, setActionEvent, setParameters, showMenuIcon
-
Method Details
-
isFinished
boolean isFinished()Returnstrue
if the algorithm has another step (that means thatnextStep()
will not throw an Exception).- Returns:
true
if the algorithm has another step,false
otherwise.
-
animate
Starts the animation of the algorithm. Further execution steps are made through thenextStep()
method.- Parameters:
g
- theGraph
to execute the algorithm on.
-
execute
Executes the whole algorithm as one big step.- Parameters:
g
- theGraph
to execute the algorithm on.
-
nextStep
Executes the next step of the algorithm.- Throws:
NoNextStepException
- if the algorithm is already finished.
-