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 Details

    • getPluginLayoutAlgs

      public static Map<String,​LayoutAlgorithmWrapper> getPluginLayoutAlgs()
      Find layout algorithms supplied by plugins.
      Returns:
      A map from algorithm name to wrapper instance
      See Also:
      LayoutAlgorithmWrapper
    • getLayoutAlgorithms

      public static Map<String,​LayoutAlgorithmWrapper> getLayoutAlgorithms()
      Find all currently available layout algorithms and returns those whitelisted.
      Returns:
      A Map of LayoutAlgorithmWrappers. The maps keys are the Algorithms' names. Only returns algorithms whose names are contained in layoutAlgWhitelist. Note that the Multilevel Framework Algorithm itself (i.e. instances of MultilevelFrameworkLayout is excluded from this list.
    • getGUIName

      public String getGUIName()
      Returns:
      the "GUI name", see the constructor (LayoutAlgorithmWrapper(String, Algorithm, boolean)) for details
    • getAlgorithm

      public Algorithm getAlgorithm()
      Returns:
      the wrapped Algorithm
    • getSuppliedLayoutAlgs

      public static Map<String,​LayoutAlgorithmWrapper> getSuppliedLayoutAlgs()
      Explicitly add other algorithms via symbolic reference
      Returns:
      A map from algorithm name to wrapper instance.
      See Also:
      MultilevelFrameworkPlugin#initializeAddon()
    • getGUI

      public JComponent getGUI()
      Returns:
      the GUI where the user can set parameters for the algorithm.
    • execute

      public void execute​(Graph graph, Selection selection)
      Execute the layout algorithm with the given Graph and Selection. Note that this is in an early stage and hasn't been thoroughly tested.
      Parameters:
      graph - The Graph. Must not be null.
      selection - The Selection. Must not be null.
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
      Object.toString()
    • execute

      public void execute​(Graph graph)
      Execute the algorithm, assuming an empty selection
      Parameters:
      graph -