use of org.opennms.features.topology.app.internal.jung.ISOMLayoutAlgorithm.NonStupidISOMLayout in project opennms by OpenNMS.
the class RealUltimateLayoutAlgorithm method doISOMLayout.
private static void doISOMLayout(final Layout graphLayout, SparseGraph<VertexRef, EdgeRef> jungGraph, Dimension size) {
NonStupidISOMLayout layout = new NonStupidISOMLayout(jungGraph, graphLayout);
layout.setInitializer(initializer(graphLayout));
layout.setSize(size);
while (!layout.done()) {
layout.step();
}
for (VertexRef v : jungGraph.getVertices()) {
graphLayout.setLocation(v, new Point(layout.getX(v), layout.getY(v)));
}
}
Aggregations