Class EdgeRoutingAlgorithm
java.lang.Object
org.graffiti.plugin.algorithm.AbstractAlgorithm
org.vanted.plugins.layout.adaptagrams.edgerouting.EdgeRoutingAlgorithm
- All Implemented Interfaces:
UndoableEdit
,Algorithm
public class EdgeRoutingAlgorithm extends AbstractAlgorithm
- Author:
- Tobias Czauderna
-
Constructor Summary
Constructors Constructor Description EdgeRoutingAlgorithm()
-
Method Summary
Modifier and Type Method Description void
check()
Check preconditions: (1) a graph with edges, (2) native layout library can be loaded.void
execute()
Executes the whole algorithm.String
getCategory()
Returns the category an algorithm should assigned to.String
getDescription()
The algorithm description.String
getName()
Returns the name (ID) of the algorithm.Parameter[]
getParameters()
Returns a list ofParameter
that are set for this algorithm.static String
getStatusTextPhaseDescription(int phaseNumber)
Get status text (description) for the according phase.static String
getStatusTextPhaseNumber(int phaseNumber)
Get status text for the according phase.boolean
isLayoutAlgorithm()
A LayoutAlgorithm should return true.void
setParameters(Parameter[] parameters)
Sets the parameters for this algorithm.Methods inherited from class org.graffiti.plugin.algorithm.AbstractAlgorithm
addEdit, attach, canRedo, canUndo, die, doesUndo, getAcceleratorKeyStroke, getActionEvent, getMenuCategory, getPresentationName, getRedoPresentationName, getSetCategory, getUndoPresentationName, isAlwaysExecutable, isSignificant, markExecutionDone, markRedoDone, markUndoDone, mayWorkOnMultipleGraphs, redo, replaceEdit, reset, setActionEvent, showMenuIcon, undo
-
Constructor Details
-
EdgeRoutingAlgorithm
public EdgeRoutingAlgorithm()
-
-
Method Details
-
check
Check preconditions: (1) a graph with edges, (2) native layout library can be loaded.- Specified by:
check
in interfaceAlgorithm
- Overrides:
check
in classAbstractAlgorithm
- Throws:
PreconditionException
- if the preconditions of the current graph are not satisfied.
-
getParameters
Description copied from interface:Algorithm
Returns a list ofParameter
that are set for this algorithm.- Specified by:
getParameters
in interfaceAlgorithm
- Overrides:
getParameters
in classAbstractAlgorithm
- Returns:
- a collection of
Parameter
that are needed by theAlgorithm
.
-
setParameters
Description copied from interface:Algorithm
Sets the parameters for this algorithm. Must have the same types and order as the array returned bygetParameter
.- Specified by:
setParameters
in interfaceAlgorithm
- Overrides:
setParameters
in classAbstractAlgorithm
- Parameters:
parameters
- Parameter array
-
getCategory
Description copied from interface:Algorithm
Returns the category an algorithm should assigned to. Return NULL if the algorithm should be sorted directly in the plugin menu.- Specified by:
getCategory
in interfaceAlgorithm
- Overrides:
getCategory
in classAbstractAlgorithm
- Returns:
- The category an algorithm should assigned to.
-
isLayoutAlgorithm
public boolean isLayoutAlgorithm()Description copied from interface:Algorithm
A LayoutAlgorithm should return true. All other types of algorithms should return false.- Specified by:
isLayoutAlgorithm
in interfaceAlgorithm
- Overrides:
isLayoutAlgorithm
in classAbstractAlgorithm
- Returns:
-
getDescription
Description copied from class:AbstractAlgorithm
The algorithm description.- Specified by:
getDescription
in interfaceAlgorithm
- Overrides:
getDescription
in classAbstractAlgorithm
- Returns:
- String, could be HTML-styled.
-
getName
Description copied from interface:Algorithm
Returns the name (ID) of the algorithm.- Returns:
- DOCUMENT ME!
-
execute
public void execute()Description copied from interface:Algorithm
Executes the whole algorithm. -
getStatusTextPhaseNumber
Get status text for the according phase.- Parameters:
phaseNumber
- phase number- Returns:
- status text for the according phase
-
getStatusTextPhaseDescription
Get status text (description) for the according phase.- Parameters:
phaseNumber
- phase number- Returns:
- status text (description) for the according phase
-