Class LayoutAlgorithmWrapper
java.lang.Object
org.vanted.plugins.layout.multilevelframework.LayoutAlgorithmWrapper
public class LayoutAlgorithmWrapper extends Object
Provides a uniform interface for layout algorithms (e.g. getting the GUI interface, running the algorithm).
-
Method Summary
Modifier and Type Method Description void
execute(Graph graph)
Execute the algorithm, assuming an empty selectionvoid
execute(Graph graph, Selection selection)
Algorithm
getAlgorithm()
JComponent
getGUI()
String
getGUIName()
static Map<String,LayoutAlgorithmWrapper>
getLayoutAlgorithms()
Find all currently available layout algorithms and returns those whitelisted.static Map<String,LayoutAlgorithmWrapper>
getPluginLayoutAlgs()
Find layout algorithms supplied by plugins.static Map<String,LayoutAlgorithmWrapper>
getSuppliedLayoutAlgs()
Explicitly add other algorithms via symbolic referenceString
toString()
-
Method Details
-
getPluginLayoutAlgs
Find layout algorithms supplied by plugins.- Returns:
- A map from algorithm name to wrapper instance
- See Also:
LayoutAlgorithmWrapper
-
getLayoutAlgorithms
Find all currently available layout algorithms and returns those whitelisted.- Returns:
- A
Map
ofLayoutAlgorithmWrapper
s. The maps keys are theAlgorithm
s' names. Only returns algorithms whose names are contained inlayoutAlgWhitelist
. Note that the Multilevel Framework Algorithm itself (i.e. instances ofMultilevelFrameworkLayout
is excluded from this list.
-
getGUIName
- Returns:
- the "GUI name", see the constructor (
LayoutAlgorithmWrapper(String, Algorithm, boolean)
) for details
-
getAlgorithm
- Returns:
- the wrapped
Algorithm
-
getSuppliedLayoutAlgs
Explicitly add other algorithms via symbolic reference- Returns:
- A map from algorithm name to wrapper instance.
- See Also:
MultilevelFrameworkPlugin#initializeAddon()
-
getGUI
- Returns:
- the GUI where the user can set parameters for the algorithm.
-
execute
-
toString
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
execute
Execute the algorithm, assuming an empty selection- Parameters:
graph
-
-