@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; }
/** * @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()); } }