private static final Color SIBLING_COLOR = new Color(0x648b4513, true);
@Override
public GraphEdgeUi2D createUi(Graph2D graph, GraphEdge edge) {
LineSegmentGraphEdgeUi ui = null;
if (edge instanceof OperationActivityEdge) {
ui = new LineSegmentGraphEdgeUi(graph, edge);
decorate((OperationActivityEdge) edge, ui);
} else if (edge instanceof ScriptSourceEdge) {
ui = new LineSegmentGraphEdgeUi(graph, edge);
decorateScriptEdgeUi(ui);
} else if (edge instanceof PipelineActivityEdge) {
ui = new PipelineActivityEdgeUi((OperationGraph2D) graph, (PipelineActivityEdge) edge);
} else {
throw new RuntimeException("Unexpected edge type: " + edge);
}
if (EdgeTypePreference.get() == EdgeType.RIGHT_ANGLES) {
LineSegmentFactory segmentFactory = new PerpendicularLineSegmentFactory(graph, edge);
ui.setLineSegmentFactory(segmentFactory);
}
ui.setLineWidth(2);
ui.setArrowSize(6);
return ui;
}