Class GridLayoutAlgorithm
- java.lang.Object
-
- org.opennms.features.topology.app.internal.jung.AbstractLayoutAlgorithm
-
- org.opennms.features.topology.app.internal.jung.GridLayoutAlgorithm
-
- All Implemented Interfaces:
LayoutAlgorithm
,LayoutConstants
public class GridLayoutAlgorithm extends AbstractLayoutAlgorithm
-
-
Field Summary
-
Fields inherited from interface org.opennms.features.topology.app.internal.jung.LayoutConstants
ELBOW_ROOM, LAYOUT_HEIGHT, LAYOUT_WIDTH, SPRING_FORCE_MULTIPLIER, SPRING_LAYOUT_REPULSION
-
-
Constructor Summary
Constructors Constructor Description GridLayoutAlgorithm()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static BoundingBox
calculateGrid(int N, int width, int height)
Calculates a grid of width W and height H such that: W * H >= N W/H ~= width/heightvoid
updateLayout(Graph graph)
Updates the current layout by extracting the containers graph and then perform a (x,y) transformation of all vertices.-
Methods inherited from class org.opennms.features.topology.app.internal.jung.AbstractLayoutAlgorithm
initializer, initializer, selectLayoutSize
-
-
-
-
Method Detail
-
updateLayout
public void updateLayout(Graph graph)
Updates the current layout by extracting the containers graph and then perform a (x,y) transformation of all vertices.- Specified by:
updateLayout
in interfaceLayoutAlgorithm
- Specified by:
updateLayout
in classAbstractLayoutAlgorithm
- Parameters:
graph
- The container of the current graph. Contains all relevant information to perform the transformation of theGraph
by changing itsLayout
-
calculateGrid
protected static BoundingBox calculateGrid(int N, int width, int height)
Calculates a grid of width W and height H such that: W * H >= N W/H ~= width/height
-
-