java.lang.Object
de.grogra.imp2d.layout.Layout.Algorithm
de.grogra.imp2d.layout.ForceBasedLayout2.FBAlgorithm2
- Enclosing class:
- ForceBasedLayout2
-
Field Summary
Fields inherited from class de.grogra.imp2d.layout.Layout.Algorithm
finalGraph, graph, state, view
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Vector
allocationNodes
(Node nodeTemp, Vector vNodes) protected void
applyVectorToNode
(Node nodeTemp, Point2d diff, double delta) protected void
Calculating the minimum x- and y-distancevoid
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 nodesprotected Point2d
getMaxBounds
(Vector nodesTemp) Calculating the maximum height and width of the nodesprotected double
getMinXNodePositionValue
(Hashtable nodesTemp, Vector no) Getting the smallest x-value of the coordinates of the nodesprotected double
getMinYNodePositionValue
(Hashtable nodesTemp, Vector no) Getting the smallest y-value of the coordinates of the nodesprotected void
This method has to be implemented to perform the layout.protected void
moveNodesToUpperLeft
(Hashtable nodesTemp, Vector no, double diffX, double diffY) Moves the nodes in the layoutMethods inherited from class de.grogra.imp2d.layout.Layout.Algorithm
acceptNode, fitLayoutToWindow, getCommandName, getGlobalMaxBounds, getGlobalMaxCoordinates, getGlobalMaxCoordinates, getGlobalMaxDistances, invokeLayout, setProgress
-
Constructor Details
-
FBAlgorithm2
public FBAlgorithm2()
-
-
Method Details
-
layout
Description copied from class:Layout.Algorithm
This method has to be implemented to perform the layout.- Specified by:
layout
in classLayout.Algorithm
- Parameters:
nodes
- the first node of the linked list of all nodes- See Also:
-
applyVectorToNode
-
moveNodesToUpperLeft
Moves the nodes in the layout- Parameters:
nodes
- Hashtables of nodesno
- Vector of a nodediffX
- the nodes will be moved for diffx-length horizontallydiffY
- the nodes will be moved for diffy-length vertically
-
getMinXNodePositionValue
Getting the smallest x-value of the coordinates of the nodes- Parameters:
nodes
- Hashtable of nodesno
- Vector of a node- Returns:
- the smallest x-position value
-
getMinYNodePositionValue
Getting the smallest y-value of the coordinates of the nodes- Parameters:
nodes
- Hashtable of nodesno
- Vector of a node- Returns:
- the smallest y-position value
-
allocationNodes
-
calcMinDistance
protected void calcMinDistance()Calculating the minimum x- and y-distance -
getMaxBounds
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
-