Class SugiyamaLayoutAlgorithm.DFSLayerProvider

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAssignedNode​(org.eclipse.gef.graph.Node node, int layer)
      Assigns the given layer to the given Node.
      java.util.List<java.util.List<SugiyamaLayoutAlgorithm.NodeWrapper>> calculateLayers​(java.util.List<org.eclipse.gef.graph.Node> nodeLayouts)
      Creating layers of the nodes and makes it possible to assign layers to those nodes.
      void clearAssignedNodes()
      Clears the Map that stores the layer assignments.
      java.util.Map<org.eclipse.gef.graph.Node,​java.lang.Integer> getAssignedNodes()
      Returns a Map that stores the assignment of layers to Nodes.
      java.util.ArrayList<org.eclipse.gef.graph.Node> getRoots​(java.util.List<org.eclipse.gef.graph.Node> nodes)
      Finds the root elements in the list of nodes based on their connections.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DFSLayerProvider

        public DFSLayerProvider()
    • Method Detail

      • getRoots

        public java.util.ArrayList<org.eclipse.gef.graph.Node> getRoots​(java.util.List<org.eclipse.gef.graph.Node> nodes)
        Finds the root elements in the list of nodes based on their connections.
        Parameters:
        nodes - The list of Nodes for which to find the root elements.
        Returns:
        the list of root elements
      • getAssignedNodes

        public java.util.Map<org.eclipse.gef.graph.Node,​java.lang.Integer> getAssignedNodes()
        Returns a Map that stores the assignment of layers to Nodes.
        Returns:
        A Map that stores the assignment of layers to Nodes.
      • addAssignedNode

        public void addAssignedNode​(org.eclipse.gef.graph.Node node,
                                    int layer)
        Assigns the given layer to the given Node.
        Parameters:
        node - The Node to which a layer is assigned.
        layer - The layer that is assigned to that Node.
      • clearAssignedNodes

        public void clearAssignedNodes()
        Clears the Map that stores the layer assignments.