Module imp2d

Class ForceBasedLayout2.FBAlgorithm2

java.lang.Object
de.grogra.imp2d.layout.Layout.Algorithm
de.grogra.imp2d.layout.ForceBasedLayout2.FBAlgorithm2
Enclosing class:
ForceBasedLayout2

public class ForceBasedLayout2.FBAlgorithm2 extends Layout.Algorithm
  • Constructor Details

    • FBAlgorithm2

      public FBAlgorithm2()
  • Method Details

    • layout

      protected void layout(Node nodes)
      Description copied from class: Layout.Algorithm
      This method has to be implemented to perform the layout.
      Specified by:
      layout in class Layout.Algorithm
      Parameters:
      nodes - the first node of the linked list of all nodes
      See Also:
    • applyVectorToNode

      protected void applyVectorToNode(Node nodeTemp, Point2d diff, double delta)
    • moveNodesToUpperLeft

      protected void moveNodesToUpperLeft(Hashtable nodesTemp, Vector no, double diffX, double diffY)
      Moves the nodes in the layout
      Parameters:
      nodes - Hashtables of nodes
      no - Vector of a node
      diffX - the nodes will be moved for diffx-length horizontally
      diffY - the nodes will be moved for diffy-length vertically
    • getMinXNodePositionValue

      protected double getMinXNodePositionValue(Hashtable nodesTemp, Vector no)
      Getting the smallest x-value of the coordinates of the nodes
      Parameters:
      nodes - Hashtable of nodes
      no - Vector of a node
      Returns:
      the smallest x-position value
    • getMinYNodePositionValue

      protected double getMinYNodePositionValue(Hashtable nodesTemp, Vector no)
      Getting the smallest y-value of the coordinates of the nodes
      Parameters:
      nodes - Hashtable of nodes
      no - Vector of a node
      Returns:
      the smallest y-position value
    • allocationNodes

      protected Vector allocationNodes(Node nodeTemp, Vector vNodes)
    • calcMinDistance

      protected void calcMinDistance()
      Calculating the minimum x- and y-distance
    • getMaxBounds

      protected Point2d getMaxBounds(Vector nodesTemp)
      Calculating the maximum height and width of the nodes
      Parameters:
      nodesTemp - Vector with nodes
      Returns:
      maxBounds the maximum width and height values
    • disassociateNodes

      public void disassociateNodes()
      Dividing the nodes of the graph into the two sets of connectedNodes (nodes that have connections to other nodes and unconnectedNodes (nodes that have not edges to other nodes