use of y.view.NodeRealizerIntersectionCalculator in project binnavi by google.
the class LayoutFunctions method recalculatePorts.
public static void recalculatePorts(final CanonicMultiStageLayouter layouter, final Graph2D graph) {
if (layouter instanceof CircularLayouter) {
// Port correction
LayoutTool.clipEdgesOnBB(graph);
// Recalculate ports (necessary for circular proximity nodes)
final PortCalculator pc = new PortCalculator();
final NodeRealizerIntersectionCalculator nrics = new NodeRealizerIntersectionCalculator(graph, true);
graph.addDataProvider(IntersectionCalculator.SOURCE_INTERSECTION_CALCULATOR_DPKEY, nrics);
final NodeRealizerIntersectionCalculator nrict = new NodeRealizerIntersectionCalculator(graph, false);
graph.addDataProvider(IntersectionCalculator.TARGET_INTERSECTION_CALCULATOR_DPKEY, nrict);
pc.doLayout(graph);
}
}
Aggregations