当前位置: 首页>>代码示例>>Java>>正文


Java EdgeShape.QuadCurve方法代码示例

本文整理汇总了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<>();
    }
}
 
开发者ID:datacleaner,项目名称:DataCleaner,代码行数:17,代码来源:JobGraphTransformers.java

示例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();
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:48,代码来源:BasicGraphGui.java

示例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);
}
 
开发者ID:timboudreau,项目名称:vl-jung,代码行数:4,代码来源:JungConnectionWidget.java

示例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);
}
 
开发者ID:timboudreau,项目名称:vl-jung,代码行数:4,代码来源:JungConnectionWidget.java


注:本文中的edu.uci.ics.jung.visualization.decorators.EdgeShape.QuadCurve方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。