public class GridLayoutAlgorithm extends AbstractLayoutAlgorithm
ELBOW_ROOM, LAYOUT_HEIGHT, LAYOUT_WIDTH, SPRING_FORCE_MULTIPLIER, SPRING_LAYOUT_REPULSION
Constructor and Description |
---|
GridLayoutAlgorithm() |
Modifier and Type | Method and 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/height
|
void |
updateLayout(Graph graph)
Updates the current layout by extracting the containers graph and then perform a (x,y) transformation
of all vertices.
|
initializer, initializer, selectLayoutSize
public void updateLayout(Graph graph)
updateLayout
in interface LayoutAlgorithm
updateLayout
in class AbstractLayoutAlgorithm
graph
- The container of the current graph. Contains all relevant information to perform the transformation
of the Graph
by changing its Layout
protected static BoundingBox calculateGrid(int N, int width, int height)
Copyright © 2020. All rights reserved.