Search in sources :

Example 41 with ZoomManager

use of org.eclipse.gef.editparts.ZoomManager in project dbeaver by dbeaver.

the class ERDEditorPart method fillDefaultEditorContributions.

protected void fillDefaultEditorContributions(IContributionManager toolBarManager) {
    ZoomManager zoomManager = rootPart.getZoomManager();
    String[] zoomStrings = new String[] { ZoomManager.FIT_ALL, ZoomManager.FIT_HEIGHT, ZoomManager.FIT_WIDTH };
    // Init zoom combo with dummy part service
    // to prevent zoom disable on part change - as it is standalone zoom control, not global one
    zoomCombo = new ZoomComboContributionItem(new IPartService() {

        @Override
        public void addPartListener(IPartListener listener) {
        }

        @Override
        public void addPartListener(IPartListener2 listener) {
        }

        @Override
        public IWorkbenchPart getActivePart() {
            return ERDEditorPart.this;
        }

        @Override
        public IWorkbenchPartReference getActivePartReference() {
            return null;
        }

        @Override
        public void removePartListener(IPartListener listener) {
        }

        @Override
        public void removePartListener(IPartListener2 listener) {
        }
    }, zoomStrings);
    zoomCombo.setZoomManager(zoomManager);
    toolBarManager.add(zoomCombo);
    // toolBarManager.add(new UndoAction(ERDEditorPart.this));
    // toolBarManager.add(new RedoAction(ERDEditorPart.this));
    // toolBarManager.add(new PrintAction(ERDEditorPart.this));
    ZoomInAction zoomInAction = new ZoomInAction(zoomManager);
    zoomInAction.setImageDescriptor(DBeaverIcons.getImageDescriptor(UIIcon.ZOOM_IN));
    ZoomOutAction zoomOutAction = new ZoomOutAction(zoomManager);
    zoomOutAction.setImageDescriptor(DBeaverIcons.getImageDescriptor(UIIcon.ZOOM_OUT));
    toolBarManager.add(zoomInAction);
    toolBarManager.add(zoomOutAction);
    toolBarManager.add(new Separator());
    // toolBarManager.add(createAttributeVisibilityMenu());
    toolBarManager.add(new DiagramLayoutAction(ERDEditorPart.this));
    toolBarManager.add(new DiagramToggleGridAction());
    toolBarManager.add(new DiagramRefreshAction(ERDEditorPart.this));
    toolBarManager.add(new Separator());
    {
        toolBarManager.add(ActionUtils.makeCommandContribution(getSite(), IWorkbenchCommandConstants.FILE_PRINT, ERDUIMessages.erd_editor_control_action_print_diagram, UIIcon.PRINT));
        toolBarManager.add(ActionUtils.makeCommandContribution(getSite(), IWorkbenchCommandConstants.FILE_SAVE_AS, ERDUIMessages.erd_editor_control_action_save_external_format, UIIcon.PICTURE_SAVE));
        toolBarManager.add(ActionUtils.makeCommandContribution(getSite(), IWorkbenchCommandConstants.FILE_SAVE, null, UIIcon.SAVE));
    }
    toolBarManager.add(new Separator());
    {
        Action configAction = new Action(ERDUIMessages.erd_editor_control_action_configuration) {

            @Override
            public void run() {
                UIUtils.showPreferencesFor(getSite().getShell(), ERDEditorPart.this, ERDPreferencePage.PAGE_ID);
            }
        };
        configAction.setImageDescriptor(DBeaverIcons.getImageDescriptor(UIIcon.CONFIGURATION));
        toolBarManager.add(configAction);
    }
}
Also used : DiagramLayoutAction(org.jkiss.dbeaver.erd.ui.action.DiagramLayoutAction) SetPartColorAction(org.jkiss.dbeaver.erd.ui.editor.tools.SetPartColorAction) DiagramRefreshAction(org.jkiss.dbeaver.erd.ui.action.DiagramRefreshAction) SetPartSettingsAction(org.jkiss.dbeaver.erd.ui.editor.tools.SetPartSettingsAction) DiagramToggleGridAction(org.jkiss.dbeaver.erd.ui.action.DiagramToggleGridAction) ResetPartColorAction(org.jkiss.dbeaver.erd.ui.editor.tools.ResetPartColorAction) ChangeZOrderAction(org.jkiss.dbeaver.erd.ui.editor.tools.ChangeZOrderAction) DiagramToggleGridAction(org.jkiss.dbeaver.erd.ui.action.DiagramToggleGridAction) DiagramRefreshAction(org.jkiss.dbeaver.erd.ui.action.DiagramRefreshAction) ZoomManager(org.eclipse.gef.editparts.ZoomManager) DiagramLayoutAction(org.jkiss.dbeaver.erd.ui.action.DiagramLayoutAction)

Example 42 with ZoomManager

use of org.eclipse.gef.editparts.ZoomManager in project archi by archimatetool.

the class MouseWheelHorizontalScrollHandler method handleMouseWheel.

/**
 * Zooms the given viewer.
 *
 * @see MouseWheelHandler#handleMouseWheel(Event, EditPartViewer)
 */
@Override
public void handleMouseWheel(Event event, EditPartViewer viewer) {
    ZoomManager zoomMgr = (ZoomManager) viewer.getProperty(ZoomManager.class.toString());
    if (zoomMgr != null) {
        Viewport viewport = zoomMgr.getViewport();
        if (viewport != null) {
            viewport.setViewLocation(viewport.getViewLocation().translate(event.count * DELTA * DIRECTION, 0));
            event.doit = false;
        }
    }
}
Also used : ZoomManager(org.eclipse.gef.editparts.ZoomManager) Viewport(org.eclipse.draw2d.Viewport)

Example 43 with ZoomManager

use of org.eclipse.gef.editparts.ZoomManager in project archi by archimatetool.

the class DragGuidePolicy method isMoveValid.

protected boolean isMoveValid(int zoomedPosition) {
    boolean result = true;
    ZoomManager zoomManager = getGuideEditPart().getZoomManager();
    int position = zoomedPosition;
    if (zoomManager != null) {
        position = (int) Math.round(position / zoomManager.getZoom());
    }
    Iterator guides = getGuideEditPart().getRulerProvider().getGuides().iterator();
    while (guides.hasNext()) {
        Object guide = guides.next();
        if (guide != getGuideEditPart().getModel()) {
            int guidePos = getGuideEditPart().getRulerProvider().getGuidePosition(guide);
            if (Math.abs(guidePos - position) < GuideEditPart.MIN_DISTANCE_BW_GUIDES) {
                result = false;
                break;
            }
        }
    }
    return result;
}
Also used : ZoomManager(org.eclipse.gef.editparts.ZoomManager) Iterator(java.util.Iterator) Point(org.eclipse.draw2d.geometry.Point)

Example 44 with ZoomManager

use of org.eclipse.gef.editparts.ZoomManager in project archi by archimatetool.

the class AbstractDiagramEditor method createActions.

/**
 * Add some extra Actions - *after* the graphical viewer has been created
 */
@SuppressWarnings("unchecked")
protected void createActions(GraphicalViewer viewer) {
    ActionRegistry registry = getActionRegistry();
    IAction action;
    // Zoom Manager tweaking
    ZoomManager zoomManager = (ZoomManager) getAdapter(ZoomManager.class);
    double[] zoomLevels = { .25, .5, .75, 1, 1.5, 2, 3, 4, 6, 8 };
    zoomManager.setZoomLevels(zoomLevels);
    List<String> zoomContributionLevels = new ArrayList<String>();
    zoomContributionLevels.add(ZoomManager.FIT_ALL);
    zoomContributionLevels.add(ZoomManager.FIT_WIDTH);
    zoomContributionLevels.add(ZoomManager.FIT_HEIGHT);
    zoomManager.setZoomLevelContributions(zoomContributionLevels);
    // Zoom Actions
    IAction zoomIn = new ZoomInAction(zoomManager);
    IAction zoomOut = new ZoomOutAction(zoomManager);
    IAction zoomNormal = new ZoomNormalAction(zoomManager);
    registry.registerAction(zoomIn);
    registry.registerAction(zoomOut);
    registry.registerAction(zoomNormal);
    // Add these zoom actions to the key binding service
    IHandlerService service = getEditorSite().getService(IHandlerService.class);
    service.activateHandler(zoomIn.getActionDefinitionId(), new ActionHandler(zoomIn));
    service.activateHandler(zoomOut.getActionDefinitionId(), new ActionHandler(zoomOut));
    service.activateHandler(zoomNormal.getActionDefinitionId(), new ActionHandler(zoomNormal));
    // Add our own Select All Action so we can select connections as well
    action = new SelectAllAction(this);
    registry.registerAction(action);
    // Add our own Print Action
    action = new PrintDiagramAction(this);
    registry.registerAction(action);
    // Direct Edit Rename
    action = new DirectEditAction(this);
    // Set this for Global Handler
    action.setId(ActionFactory.RENAME.getId());
    // Externalise this one
    action.setText(Messages.AbstractDiagramEditor_4);
    action.setToolTipText(Messages.AbstractDiagramEditor_13);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Change the Delete Action label
    action = registry.getAction(ActionFactory.DELETE.getId());
    action.setText(Messages.AbstractDiagramEditor_2);
    action.setToolTipText(action.getText());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Paste
    PasteAction pasteAction = new PasteAction(this, viewer);
    registry.registerAction(pasteAction);
    getSelectionActions().add(pasteAction.getId());
    // Paste Special
    PasteSpecialAction pasteSpecialAction = new PasteSpecialAction(this, viewer);
    registry.registerAction(pasteSpecialAction);
    getSelectionActions().add(pasteSpecialAction.getId());
    // Cut
    action = new CutAction(this, pasteAction);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Copy
    action = new CopyAction(this, pasteAction);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Use Grid Action
    action = new ToggleGridEnabledAction();
    registry.registerAction(action);
    // Show Grid Action
    action = new ToggleGridVisibleAction();
    registry.registerAction(action);
    // Snap to Alignment Guides
    action = new ToggleSnapToAlignmentGuidesAction();
    registry.registerAction(action);
    // Ruler
    // IAction showRulers = new ToggleRulerVisibilityAction(getGraphicalViewer());
    // registry.registerAction(showRulers);
    action = new MatchWidthAction(this);
    // Externalise string as it's internal to GEF
    action.setText(Messages.AbstractDiagramEditor_5);
    action.setToolTipText(Messages.AbstractDiagramEditor_14);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    action = new MatchHeightAction(this);
    registry.registerAction(action);
    // Externalise string as it's internal to GEF
    action.setText(Messages.AbstractDiagramEditor_6);
    action.setToolTipText(Messages.AbstractDiagramEditor_15);
    getSelectionActions().add(action.getId());
    action = new MatchSizeAction(this);
    registry.registerAction(action);
    // Externalise string as it's internal to GEF
    action.setText(Messages.AbstractDiagramEditor_22);
    action.setToolTipText(Messages.AbstractDiagramEditor_23);
    getSelectionActions().add(action.getId());
    action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.LEFT);
    // Externalise string as it's internal to GEF
    action.setText(Messages.AbstractDiagramEditor_7);
    action.setToolTipText(Messages.AbstractDiagramEditor_16);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.RIGHT);
    // Externalise string as it's internal to GEF
    action.setText(Messages.AbstractDiagramEditor_8);
    action.setToolTipText(Messages.AbstractDiagramEditor_17);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.TOP);
    // Externalise string as it's internal to GEF
    action.setText(Messages.AbstractDiagramEditor_9);
    action.setToolTipText(Messages.AbstractDiagramEditor_18);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.BOTTOM);
    // Externalise string as it's internal to GEF
    action.setText(Messages.AbstractDiagramEditor_10);
    action.setToolTipText(Messages.AbstractDiagramEditor_19);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.CENTER);
    // Externalise string as it's internal to GEF
    action.setText(Messages.AbstractDiagramEditor_11);
    action.setToolTipText(Messages.AbstractDiagramEditor_20);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.MIDDLE);
    // Externalise string as it's internal to GEF
    action.setText(Messages.AbstractDiagramEditor_12);
    action.setToolTipText(Messages.AbstractDiagramEditor_21);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    // Default Size
    action = new DefaultEditPartSizeAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Reset Aspect Ratio
    action = new ResetAspectRatioAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Properties
    action = new PropertiesAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    // Fill Colour
    action = new FillColorAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Connection Line Width
    action = new ConnectionLineWidthAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Connection Line Color
    action = new LineColorAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Font
    action = new FontAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Font Colour
    action = new FontColorAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Fill Opacity
    action = new OpacityAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Outline Opacity
    action = new OutlineOpacityAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Export As Image
    action = new ExportAsImageAction(this);
    registry.registerAction(action);
    // Export As Image to Clipboard
    action = new ExportAsImageToClipboardAction(this);
    registry.registerAction(action);
    // Connection Router types
    action = new ConnectionRouterAction.BendPointConnectionRouterAction(this);
    registry.registerAction(action);
    action = new ConnectionRouterAction.ManhattanConnectionRouterAction(this);
    registry.registerAction(action);
    // Send Backward
    action = new SendBackwardAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Bring Forward
    action = new BringForwardAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Send to Back
    action = new SendToBackAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Bring To Front
    action = new BringToFrontAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Text Alignment Actions
    for (TextAlignmentAction a : TextAlignmentAction.createActions(this)) {
        registry.registerAction(a);
        getSelectionActions().add(a.getId());
        getUpdateCommandStackActions().add(a);
    }
    // Text Position Actions
    for (TextPositionAction a : TextPositionAction.createActions(this)) {
        registry.registerAction(a);
        getSelectionActions().add(a.getId());
        getUpdateCommandStackActions().add(a);
    }
    // Lock Object
    action = new LockObjectAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Border Color
    action = new BorderColorAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
    getUpdateCommandStackActions().add((UpdateAction) action);
    // Full Screen
    if (!PlatformUtils.isMac()) {
        action = new FullScreenAction(this);
        registry.registerAction(action);
    }
    // Select Element in Tree
    action = new SelectElementInTreeAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
}
Also used : MatchHeightAction(org.eclipse.gef.ui.actions.MatchHeightAction) MatchSizeAction(org.eclipse.gef.ui.actions.MatchSizeAction) ZoomOutAction(org.eclipse.gef.ui.actions.ZoomOutAction) ArrayList(java.util.ArrayList) LineColorAction(com.archimatetool.editor.diagram.actions.LineColorAction) ConnectionRouterAction(com.archimatetool.editor.diagram.actions.ConnectionRouterAction) TextPositionAction(com.archimatetool.editor.diagram.actions.TextPositionAction) FullScreenAction(com.archimatetool.editor.diagram.actions.FullScreenAction) ActionRegistry(org.eclipse.gef.ui.actions.ActionRegistry) PropertiesAction(com.archimatetool.editor.diagram.actions.PropertiesAction) IWorkbenchPart(org.eclipse.ui.IWorkbenchPart) ZoomNormalAction(com.archimatetool.editor.diagram.actions.ZoomNormalAction) DirectEditAction(org.eclipse.gef.ui.actions.DirectEditAction) ZoomInAction(org.eclipse.gef.ui.actions.ZoomInAction) MatchWidthAction(org.eclipse.gef.ui.actions.MatchWidthAction) FillColorAction(com.archimatetool.editor.diagram.actions.FillColorAction) SendToBackAction(com.archimatetool.editor.diagram.actions.SendToBackAction) ToggleGridEnabledAction(com.archimatetool.editor.diagram.actions.ToggleGridEnabledAction) BringForwardAction(com.archimatetool.editor.diagram.actions.BringForwardAction) ConnectionLineWidthAction(com.archimatetool.editor.diagram.actions.ConnectionLineWidthAction) TextAlignmentAction(com.archimatetool.editor.diagram.actions.TextAlignmentAction) IHandlerService(org.eclipse.ui.handlers.IHandlerService) SelectAllAction(com.archimatetool.editor.diagram.actions.SelectAllAction) ExportAsImageToClipboardAction(com.archimatetool.editor.diagram.actions.ExportAsImageToClipboardAction) OpacityAction(com.archimatetool.editor.diagram.actions.OpacityAction) OutlineOpacityAction(com.archimatetool.editor.diagram.actions.OutlineOpacityAction) ActionHandler(org.eclipse.jface.commands.ActionHandler) PrintDiagramAction(com.archimatetool.editor.diagram.actions.PrintDiagramAction) CutAction(com.archimatetool.editor.diagram.actions.CutAction) PasteSpecialAction(com.archimatetool.editor.diagram.actions.PasteSpecialAction) FontColorAction(com.archimatetool.editor.diagram.actions.FontColorAction) ResetAspectRatioAction(com.archimatetool.editor.diagram.actions.ResetAspectRatioAction) BringToFrontAction(com.archimatetool.editor.diagram.actions.BringToFrontAction) SelectElementInTreeAction(com.archimatetool.editor.diagram.actions.SelectElementInTreeAction) IAction(org.eclipse.jface.action.IAction) CopyAction(com.archimatetool.editor.diagram.actions.CopyAction) TextAlignmentAction(com.archimatetool.editor.diagram.actions.TextAlignmentAction) AlignmentAction(org.eclipse.gef.ui.actions.AlignmentAction) ToggleGridVisibleAction(com.archimatetool.editor.diagram.actions.ToggleGridVisibleAction) FontAction(com.archimatetool.editor.diagram.actions.FontAction) SendBackwardAction(com.archimatetool.editor.diagram.actions.SendBackwardAction) DefaultEditPartSizeAction(com.archimatetool.editor.diagram.actions.DefaultEditPartSizeAction) PasteAction(com.archimatetool.editor.diagram.actions.PasteAction) BorderColorAction(com.archimatetool.editor.diagram.actions.BorderColorAction) ZoomManager(org.eclipse.gef.editparts.ZoomManager) ToggleSnapToAlignmentGuidesAction(com.archimatetool.editor.diagram.actions.ToggleSnapToAlignmentGuidesAction) OutlineOpacityAction(com.archimatetool.editor.diagram.actions.OutlineOpacityAction) ExportAsImageAction(com.archimatetool.editor.diagram.actions.ExportAsImageAction) LockObjectAction(com.archimatetool.editor.diagram.actions.LockObjectAction)

Example 45 with ZoomManager

use of org.eclipse.gef.editparts.ZoomManager in project dbeaver by serge-rider.

the class ERDEditorPart method configureGraphicalViewer.

@Override
protected void configureGraphicalViewer() {
    super.configureGraphicalViewer();
    this.getGraphicalViewer().getControl().setBackground(UIUtils.getColorRegistry().get(ERDUIConstants.COLOR_ERD_DIAGRAM_BACKGROUND));
    GraphicalViewer graphicalViewer = getGraphicalViewer();
    /*
        MenuManager manager = new MenuManager(getClass().getName(), getClass().getName());
        manager.setRemoveAllWhenShown(true);
        getEditorSite().registerContextMenu(getClass().getName() + ".EditorContext", manager, graphicalViewer, true); //$NON-NLS-1$
*/
    DBPPreferenceStore store = ERDUIActivator.getDefault().getPreferences();
    graphicalViewer.setProperty(SnapToGrid.PROPERTY_GRID_ENABLED, store.getBoolean(ERDUIConstants.PREF_GRID_ENABLED));
    graphicalViewer.setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, store.getBoolean(ERDUIConstants.PREF_GRID_ENABLED));
    graphicalViewer.setProperty(SnapToGrid.PROPERTY_GRID_SPACING, new Dimension(store.getInt(ERDUIConstants.PREF_GRID_WIDTH), store.getInt(ERDUIConstants.PREF_GRID_HEIGHT)));
    // initialize actions
    createActions();
    // Setup zoom manager
    ZoomManager zoomManager = rootPart.getZoomManager();
    List<String> zoomLevels = new ArrayList<>(3);
    zoomLevels.add(ZoomManager.FIT_ALL);
    zoomLevels.add(ZoomManager.FIT_WIDTH);
    zoomLevels.add(ZoomManager.FIT_HEIGHT);
    zoomManager.setZoomLevelContributions(zoomLevels);
    zoomManager.setZoomLevels(new double[] { .1, .1, .2, .3, .5, .6, .7, .8, .9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.5, 3, 4 });
    IAction zoomIn = new ZoomInAction(zoomManager);
    IAction zoomOut = new ZoomOutAction(zoomManager);
    addAction(zoomIn);
    addAction(zoomOut);
    graphicalViewer.addSelectionChangedListener(event -> {
        String status;
        IStructuredSelection selection = (IStructuredSelection) event.getSelection();
        if (selection.isEmpty()) {
            status = "";
        } else if (selection.size() == 1) {
            status = CommonUtils.toString(selection.getFirstElement());
        } else {
            status = selection.size() + " objects";
        }
        if (progressControl != null) {
            progressControl.setInfo(status);
        }
        updateActions(editPartActionIDs);
    });
}
Also used : ZoomManager(org.eclipse.gef.editparts.ZoomManager) ArrayList(java.util.ArrayList) Dimension(org.eclipse.draw2d.geometry.Dimension) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) DBPPreferenceStore(org.jkiss.dbeaver.model.preferences.DBPPreferenceStore)

Aggregations

ZoomManager (org.eclipse.gef.editparts.ZoomManager)46 Point (org.eclipse.draw2d.geometry.Point)14 ArrayList (java.util.ArrayList)7 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)5 Dimension (org.eclipse.draw2d.geometry.Dimension)4 ScalableFreeformRootEditPart (org.eclipse.gef.editparts.ScalableFreeformRootEditPart)4 ZoomInAction (org.eclipse.gef.ui.actions.ZoomInAction)4 ZoomOutAction (org.eclipse.gef.ui.actions.ZoomOutAction)4 Iterator (java.util.Iterator)3 Rectangle (org.eclipse.draw2d.geometry.Rectangle)3 GraphicalViewer (org.eclipse.gef.GraphicalViewer)3 IAction (org.eclipse.jface.action.IAction)3 ConnectionContainerEditPart (org.knime.workbench.editor2.editparts.ConnectionContainerEditPart)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 Method (java.lang.reflect.Method)2 AbsoluteBendpoint (org.eclipse.draw2d.AbsoluteBendpoint)2 Bendpoint (org.eclipse.draw2d.Bendpoint)2 FigureCanvas (org.eclipse.draw2d.FigureCanvas)2 Viewport (org.eclipse.draw2d.Viewport)2 KeyHandler (org.eclipse.gef.KeyHandler)2