本文整理汇总了Java中org.insightech.er.editor.view.ERDiagramPopupMenuManager类的典型用法代码示例。如果您正苦于以下问题:Java ERDiagramPopupMenuManager类的具体用法?Java ERDiagramPopupMenuManager怎么用?Java ERDiagramPopupMenuManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ERDiagramPopupMenuManager类属于org.insightech.er.editor.view包,在下文中一共展示了ERDiagramPopupMenuManager类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initializeGraphicalViewer
import org.insightech.er.editor.view.ERDiagramPopupMenuManager; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void initializeGraphicalViewer() {
final GraphicalViewer viewer = getGraphicalViewer();
viewer.setEditPartFactory(editPartFactory);
initViewerAction(viewer);
initDragAndDrop(viewer);
viewer.setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.MOD1), MouseWheelZoomHandler.SINGLETON);
viewer.setProperty(SnapToGrid.PROPERTY_GRID_ENABLED, true);
viewer.setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, true);
viewer.setProperty(SnapToGeometry.PROPERTY_SNAP_ENABLED, true);
final MenuManager menuMgr = new ERDiagramPopupMenuManager(getActionRegistry(), diagram);
extensionLoader.addERDiagramPopupMenu(menuMgr, getActionRegistry());
viewer.setContextMenu(menuMgr);
viewer.setContents(diagram);
outlineMenuMgr = new ERDiagramOutlinePopupMenuManager(diagram, getActionRegistry(), outlinePage.getOutlineActionRegistory(), outlinePage.getViewer());
}
示例2: initializeGraphicalViewer
import org.insightech.er.editor.view.ERDiagramPopupMenuManager; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void initializeGraphicalViewer() {
GraphicalViewer viewer = this.getGraphicalViewer();
viewer.setEditPartFactory(editPartFactory);
this.initViewerAction(viewer);
this.initDragAndDrop(viewer);
viewer.setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.MOD1),
MouseWheelZoomHandler.SINGLETON);
viewer.setProperty(SnapToGrid.PROPERTY_GRID_ENABLED, true);
viewer.setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, true);
viewer.setProperty(SnapToGeometry.PROPERTY_SNAP_ENABLED, true);
MenuManager menuMgr = new ERDiagramPopupMenuManager(
this.getActionRegistry(), this.diagram, this);
this.extensionLoader.addERDiagramPopupMenu(menuMgr,
this.getActionRegistry());
viewer.setContextMenu(menuMgr);
viewer.setContents(diagram);
}
示例3: initializeGraphicalViewer
import org.insightech.er.editor.view.ERDiagramPopupMenuManager; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void initializeGraphicalViewer() {
GraphicalViewer viewer = this.getGraphicalViewer();
viewer.setEditPartFactory(editPartFactory);
this.initViewerAction(viewer);
this.initDragAndDrop(viewer);
viewer.setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.MOD1),
MouseWheelZoomHandler.SINGLETON);
viewer.setProperty(SnapToGrid.PROPERTY_GRID_ENABLED, true);
viewer.setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, true);
viewer.setProperty(SnapToGeometry.PROPERTY_SNAP_ENABLED, true);
MenuManager menuMgr = new ERDiagramPopupMenuManager(
this.getActionRegistry(), this.diagram);
this.extensionLoader.addERDiagramPopupMenu(menuMgr,
this.getActionRegistry());
viewer.setContextMenu(menuMgr);
viewer.setContents(diagram);
this.outlineMenuMgr = new ERDiagramOutlinePopupMenuManager(
this.diagram, this.getActionRegistry(),
this.outlinePage.getOutlineActionRegistory(),
this.outlinePage.getViewer());
}