/** * parse out the edge shape * * @param edgeShape */ private void setEdgeShape(String edgeShape) { RenderContext rc = vv.getRenderContext(); switch (edgeShape) { case "LINE": rc.setEdgeShapeFunction(EdgeShape.line()); break; case "CUBIC_CURVE": rc.setEdgeShapeFunction(EdgeShape.cubicCurve()); break; case "ORTHOGONAL": rc.setEdgeShapeFunction(EdgeShape.orthogonal()); break; case "WEDGE": rc.setEdgeShapeFunction(EdgeShape.wedge(10)); break; case "QUAD_CURVE": default: rc.setEdgeShapeFunction(EdgeShape.quadCurve()); break; } }
e -> { if (e.getStateChange() == ItemEvent.SELECTED) { vv.getRenderContext().setEdgeShapeFunction(EdgeShape.line()); vv.repaint(); e -> { if (e.getStateChange() == ItemEvent.SELECTED) { vv.getRenderContext().setEdgeShapeFunction(EdgeShape.quadCurve()); vv.repaint(); e -> { if (e.getStateChange() == ItemEvent.SELECTED) { vv.getRenderContext().setEdgeShapeFunction(EdgeShape.cubicCurve()); vv.repaint();
vv = new VisualizationViewer<>(graph, treeLayoutAlgorithm, new Dimension(600, 600)); vv.setBackground(Color.white); vv.getRenderContext().setEdgeShapeFunction(EdgeShape.line()); vv.getRenderContext().setNodeLabelFunction(Object::toString);
vv.getRenderContext().setEdgeShapeFunction(EdgeShape.line()); vv.getRenderContext().setNodeLabelFunction(Object::toString);
graph, treeLayoutAlgorithm, new Dimension(900, 900), new Dimension(600, 600)); vv.setBackground(Color.white); vv.getRenderContext().setEdgeShapeFunction(EdgeShape.line()); vv.getRenderContext().setNodeLabelFunction(Object::toString);
vv.getRenderContext().setEdgeShapeFunction(EdgeShape.line());
vv3 = new VisualizationViewer<>(visualizationModel, preferredSize); vv1.getRenderContext().setEdgeShapeFunction(EdgeShape.line()); vv2.getRenderContext().setNodeShapeFunction(n -> new Rectangle2D.Float(-6, -6, 12, 12)); vv2.getRenderContext().setEdgeShapeFunction(EdgeShape.quadCurve()); vv3.getRenderContext().setEdgeShapeFunction(EdgeShape.cubicCurve());
.setMultiLayerTransformer(vv0.getRenderContext().getMultiLayerTransformer()); vv1.getRenderContext().setEdgeShapeFunction(EdgeShape.line());
vv.getRenderContext().setEdgeShapeFunction(EdgeShape.line()); vv.getRenderContext().setNodeLabelFunction(Object::toString); vv.getRenderContext().setNodeShapeFunction(new ClusterNodeShapeFunction<>());
} else if (source == e_line) { if (source.isSelected()) { vv.getRenderContext().setEdgeShapeFunction(EdgeShape.line()); vv.getRenderContext().setEdgeShapeFunction(EdgeShape.orthogonal()); vv.getRenderContext().setEdgeShapeFunction(EdgeShape.wedge(10)); vv.getRenderContext().setEdgeShapeFunction(EdgeShape.quadCurve()); vv.getRenderContext().setEdgeShapeFunction(EdgeShape.cubicCurve());
vv.getRenderContext().setEdgeStrokeFunction(ewcs); vv.getRenderContext().setEdgeIncludePredicate(showEdge); vv.getRenderContext().setEdgeShapeFunction(EdgeShape.line());