java.lang.Object
org.graffiti.plugin.algorithm.ThreadSafeAlgorithm
de.ipk_gatersleben.ag_nw.graffiti.plugins.layouters.pattern_springembedder.PatternSpringembedder3d
All Implemented Interfaces:
Algorithm

public class PatternSpringembedder3d
extends ThreadSafeAlgorithm
Spring Embedder Algorithm. Example #3.
Author:
Christian Klukas
  • Field Details

    • enabled

      public static boolean enabled
    • springName

      public static final String springName
      See Also:
      Constant Field Values
    • calcCounter

      public int calcCounter
  • Constructor Details

    • PatternSpringembedder3d

      public PatternSpringembedder3d()
  • Method Details

    • getName

      public String getName()
      Sets Menu Command Title
      Returns:
      Menu command title
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getActionEvent

      public ActionEvent getActionEvent()
    • setActionEvent

      public void setActionEvent​(ActionEvent a)
    • getPatternNodesPublic

      public static ArrayList<NodeCacheEntry3d> getPatternNodesPublic​(ArrayList<NodeCacheEntry3d> nodeArray, NodeCacheEntry3d nodeInfo)
    • check

      public void check() throws PreconditionException
      Error Checking
      Throws:
      PreconditionException
      PreconditionException - DOCUMENT ME!
    • execute

      public void execute()
      Layout Algorithm
    • readPatternConnections

      public void readPatternConnections​(ThreadSafeOptions options)
      Init cache entry for a node (get pattern nodes-call cache)
      Parameters:
      options - DOCUMENT ME!
    • setParameters

      public void setParameters​(Parameter[] params)
      Description copied from interface: Algorithm
      Sets the parameters for this algorithm. Must have the same types and order as the array returned by getParameter.
    • getParameters

      public Parameter[] getParameters()
      Description copied from interface: Algorithm
      Returns a list of Parameter that are set for this algorithm.
      Returns:
      a collection of Parameter that are needed by the Algorithm.
    • setControlInterface

      public boolean setControlInterface​(ThreadSafeOptions options, JComponent jc)
      Description copied from class: ThreadSafeAlgorithm
      DOCUMENT ME!
      Specified by:
      setControlInterface in class ThreadSafeAlgorithm
      Returns:
      true, if an GUI was set, false if no interface is needed
    • resetDataCache

      public void resetDataCache​(ThreadSafeOptions options)
      Initialized the node cache structures.
      Specified by:
      resetDataCache in class ThreadSafeAlgorithm
      Parameters:
      options - The options to use
    • executeThreadSafe

      public void executeThreadSafe​(ThreadSafeOptions options)
      Specified by:
      executeThreadSafe in class ThreadSafeAlgorithm
    • attach

      public void attach​(Graph g, Selection s)
      Description copied from interface: Algorithm
      Attaches the given graph to this algorithm. A ttaches the given Selection information to the algorithm.
      Parameters:
      g - the graph to attach.
      s - the selection to attach.
    • reset

      public void reset()
      Description copied from interface: Algorithm
      Resets the internal state of the algorithm.
    • getCategory

      public String 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.
      Returns:
      The category an algorithm should assigned to.
    • getSetCategory

      public Set<Category> getSetCategory()
      Description copied from interface: Algorithm
      Returns a set of categories to classify this algorithm . e.g. return new HashSet(Arrays.asList( Category.GRAPH, Category.NODE )); is an algorithm, working on graphs and more specific on nodes
      Returns:
      Set of Category Enums that classify this algorithm.
    • getMenuCategory

      public String getMenuCategory()
      Description copied from interface: Algorithm
      Returns a path to a menu category. This is s '.' separated string which reflects the position of this Algorithm in the Menu Hierarchy e.g. "Network.Layout" would put this algorithm in the menu 'Network' and its submenu 'Layout' If this menu is not existent it will be created If this method returns 'null' the algorithm will not appear in the menu
      Returns:
    • isLayoutAlgorithm

      public boolean isLayoutAlgorithm()
      Description copied from interface: Algorithm
      A LayoutAlgorithm should return true. All other types of algorithms should return false.
      Returns:
    • getDescription

      public String getDescription()