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 VectorallocationNodes(Node nodeTemp, Vector vNodes) protected voidapplyVectorToNode(Node nodeTemp, Point2d diff, double delta) protected voidCalculating the minimum x- and y-distancevoidDividing 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 Point2dgetMaxBounds(Vector nodesTemp) Calculating the maximum height and width of the nodesprotected doublegetMinXNodePositionValue(Hashtable nodesTemp, Vector no) Getting the smallest x-value of the coordinates of the nodesprotected doublegetMinYNodePositionValue(Hashtable nodesTemp, Vector no) Getting the smallest y-value of the coordinates of the nodesprotected voidThis method has to be implemented to perform the layout.protected voidmoveNodesToUpperLeft(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.AlgorithmThis method has to be implemented to perform the layout.- Specified by:
layoutin 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:
no- Vector of a nodediffX- the nodes will be moved for diffx-length horizontallydiffY- the nodes will be moved for diffy-length verticallynodes- Hashtables of nodes
-
getMinXNodePositionValue
Getting the smallest x-value of the coordinates of the nodes- Parameters:
no- Vector of a nodenodes- Hashtable of nodes- Returns:
- the smallest x-position value
-
getMinYNodePositionValue
Getting the smallest y-value of the coordinates of the nodes- Parameters:
no- Vector of a nodenodes- Hashtable of nodes- 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
-