本文整理汇总了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);
}
示例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;
}
示例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);
}
示例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());
}
}
示例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();
}
示例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);
}
}
示例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();
}
示例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;
}