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


Java ConnectionLayer.setConnectionRouter方法代码示例

本文整理汇总了Java中org.eclipse.draw2d.ConnectionLayer.setConnectionRouter方法的典型用法代码示例。如果您正苦于以下问题:Java ConnectionLayer.setConnectionRouter方法的具体用法?Java ConnectionLayer.setConnectionRouter怎么用?Java ConnectionLayer.setConnectionRouter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.draw2d.ConnectionLayer的用法示例。


在下文中一共展示了ConnectionLayer.setConnectionRouter方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: activate

import org.eclipse.draw2d.ConnectionLayer; //导入方法依赖的package包/类
public void activate() {
	super.activate();
	ScalableRootEditPart root = (ScalableRootEditPart) getViewer().getRootEditPart();
	ConnectionLayer connLayer = (ConnectionLayer) root.getLayer(LayerConstants.CONNECTION_LAYER);
	GraphicalEditPart contentEditPart = (GraphicalEditPart) root.getContents();
	FanRouter router = new FanRouter();
	router.setSeparation(100);
	ShortestPathConnectionRouter spRouter = new ShortestPathConnectionRouter(contentEditPart.getFigure());
	router.setNextRouter(spRouter);
	connLayer.setConnectionRouter(router);
	GraphSelectionManager.ME.selectionPartChanged(this);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:13,代码来源:GraphPart.java

示例2: createFigure

import org.eclipse.draw2d.ConnectionLayer; //导入方法依赖的package包/类
@Override
protected IFigure createFigure() {
	Figure f = new FreeformLayer();
	f.setBorder(new MarginBorder(3));
	f.setLayoutManager(new FreeformLayout());

	// Create the static router for the connection layer
	ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
	connLayer.setConnectionRouter(new ManhattanConnectionRouter());
	return f;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:12,代码来源:ContainerEditPart.java

示例3: refreshVisuals

import org.eclipse.draw2d.ConnectionLayer; //导入方法依赖的package包/类
protected void refreshVisuals() {
	super.refreshVisuals();
	ConnectionLayer connectionLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
	connectionLayer.setConnectionRouter(new ShortestPathConnectionRouter(figure));
	if ((getViewer().getControl().getStyle() & SWT.MIRRORED) == 0) {
		connectionLayer.setAntialias(SWT.ON);
	}
	Animation.run(400);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:10,代码来源:SchemaEditPart.java

示例4: initializeGraphicalViewer

import org.eclipse.draw2d.ConnectionLayer; //导入方法依赖的package包/类
/**
 * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#initializeGraphicalViewer()
 */
@Override
protected void initializeGraphicalViewer() {
    super.initializeGraphicalViewer();
    GraphicalViewer viewer = getGraphicalViewer();
    // ManhattanConnectionRouter 설정
    if ("true".equals(PreferenceUtil.INSTANCE.getValueOfStringFieldEditor(ManagerConstant.PREFERENCE_ACTIVITYDIAGRAM_CONNECTION_ROUTER_USE))) {
        ScalableFreeformRootEditPart root = (ScalableFreeformRootEditPart) viewer.getRootEditPart();
        ConnectionLayer connLayer = (ConnectionLayer) root.getLayer(LayerConstants.CONNECTION_LAYER);
        connLayer.setConnectionRouter(new ManhattanConnectionRouter());
    }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:15,代码来源:ActivityDiagramEditor.java

示例5: registerVisuals

import org.eclipse.draw2d.ConnectionLayer; //导入方法依赖的package包/类
/**
 * 
 * Setup the connection router
 * 
 * @see org.eclipse.gef.editparts.AbstractEditPart#registerVisuals()
 */
protected void registerVisuals() {
    ConnectionLayer cLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
    cLayer.setConnectionRouter(new UCMConnectionRouter(getViewer().getEditPartRegistry(), (UCMmap) getDiagram()));

    super.registerVisuals();
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:13,代码来源:UCMMapEditPart.java

示例6: disconnectRouter

import org.eclipse.draw2d.ConnectionLayer; //导入方法依赖的package包/类
public void disconnectRouter() {
    ConnectionLayer cLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
    if (cLayer != null) {
        if (cLayer.getConnectionRouter() instanceof UCMConnectionRouter) {
            UCMConnectionRouter router = (UCMConnectionRouter) cLayer.getConnectionRouter();
            router.dispose();

        }
        cLayer.setConnectionRouter(null);
    }
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:12,代码来源:UCMMapEditPart.java

示例7: registerVisuals

import org.eclipse.draw2d.ConnectionLayer; //导入方法依赖的package包/类
/**
 * (non-Javadoc)
 * 
 * @see org.eclipse.gef.editparts.AbstractEditPart#registerVisuals()
 */
protected void registerVisuals() {
    ConnectionLayer cLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
    cLayer.setConnectionRouter(new BendpointConnectionRouter());

    super.registerVisuals();
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:12,代码来源:GrlGraphEditPart.java

示例8: createFigure

import org.eclipse.draw2d.ConnectionLayer; //导入方法依赖的package包/类
protected IFigure createFigure() {
	Figure f = new FreeformLayer();
	f.setBorder(new MarginBorder(3));
	f.setLayoutManager(new FreeformLayout());

	// Create the static router for the connection layer
	ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
	connLayer.setConnectionRouter(new ShortestPathConnectionRouter(f));

	return f;
}
 
开发者ID:lunifera,项目名称:lunifera-sharky-m2m,代码行数:12,代码来源:DiagramEditPart.java


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