本文整理汇总了Java中edu.uci.ics.jung.visualization.decorators.EdgeShape.QuadCurve方法的典型用法代码示例。如果您正苦于以下问题:Java EdgeShape.QuadCurve方法的具体用法?Java EdgeShape.QuadCurve怎么用?Java EdgeShape.QuadCurve使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.uci.ics.jung.visualization.decorators.EdgeShape
的用法示例。
在下文中一共展示了EdgeShape.QuadCurve方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBaseEdgeShapeTransformer
import edu.uci.ics.jung.visualization.decorators.EdgeShape; //导入方法依赖的package包/类
private Transformer<Context<Graph<Object, JobGraphLink>, JobGraphLink>, Shape> getBaseEdgeShapeTransformer(
final String edgeStyle) {
if (edgeStyle == null) {
return new EdgeShape.QuadCurve<>();
}
switch (edgeStyle) {
case EDGE_STYLE_NAME_STRAIGHT:
return new EdgeShape.Line<>();
case EDGE_STYLE_NAME_CURVED:
return new EdgeShape.QuadCurve<>();
case EDGE_STYLE_NAME_ORTOGHONAL:
return new EdgeShape.Orthogonal<>();
default:
return new EdgeShape.QuadCurve<>();
}
}
示例2: setEdgeShapeTransformer
import edu.uci.ics.jung.visualization.decorators.EdgeShape; //导入方法依赖的package包/类
/**
* Sets the edge shape transformer according to the {@link GeneralGraphSettings4MAS}.
* @see GeneralGraphSettings4MAS#getEdgeShape()
* @param visViewer the vis viewer
*/
public void setEdgeShapeTransformer(BasicGraphGuiVisViewer<GraphNode, GraphEdge> visViewer) {
// --- Use straight lines as edges ? ------------------------------
AbstractEdgeShapeTransformer<GraphNode, GraphEdge> edgeShapeTransformer = null;
switch (this.getGraphEnvironmentController().getNetworkModelAdapter().getGeneralGraphSettings4MAS().getEdgeShape()) {
case BentLine:
edgeShapeTransformer = new EdgeShape.BentLine<GraphNode, GraphEdge>();
break;
case Box:
edgeShapeTransformer = new EdgeShape.Box<GraphNode, GraphEdge>();
break;
case CubicCurve:
edgeShapeTransformer = new EdgeShape.CubicCurve<GraphNode, GraphEdge>();
break;
case Line:
edgeShapeTransformer = new EdgeShape.Line<GraphNode, GraphEdge>();
break;
case Polyline:
edgeShapeTransformer = new EdgeShapePolyline<GraphNode, GraphEdge>();
break;
case Loop:
edgeShapeTransformer = new EdgeShape.Loop<GraphNode, GraphEdge>();
break;
case Orthogonal:
edgeShapeTransformer = new EdgeShape.Orthogonal<GraphNode, GraphEdge>();
break;
case QuadCurve:
edgeShapeTransformer = new EdgeShape.QuadCurve<GraphNode, GraphEdge>();
break;
case SimpleLoop:
edgeShapeTransformer = new EdgeShape.SimpleLoop<GraphNode, GraphEdge>();
break;
case Wedge:
edgeShapeTransformer = new EdgeShape.Wedge<GraphNode, GraphEdge>(5);
break;
default:
edgeShapeTransformer = new EdgeShape.Line<GraphNode, GraphEdge>();
break;
}
visViewer.getRenderContext().setEdgeShapeTransformer(edgeShapeTransformer);
visViewer.repaint();
}
示例3: createQuadratic
import edu.uci.ics.jung.visualization.decorators.EdgeShape; //导入方法依赖的package包/类
public static <V, E> JungConnectionWidget<V, E> createQuadratic(JungScene<V, E> scene, E edge) {
return new JungConnectionWidget<>(scene, new EdgeShape.QuadCurve<V, E>(), edge);
}
示例4: JungConnectionWidget
import edu.uci.ics.jung.visualization.decorators.EdgeShape; //导入方法依赖的package包/类
public JungConnectionWidget(JungScene<V, E> scene, E edge) {
this(scene, new EdgeShape.QuadCurve<V, E>(), edge);
}