From 9ed9fc93f761bd1ec3bb56049c0406aff7f70f85 Mon Sep 17 00:00:00 2001 From: "gyeongmin.ju" Date: Mon, 12 May 2014 18:21:46 +0900 Subject: [PATCH] UIB : add resize command Signed-off-by: gyeongmin.ju Change-Id: I6a7ffe66b0153b6899f4e21c42cc7a8e94c85dd5 --- .../tizen/webuibuilder/gef/commands/Messages.java | 12 ++ .../webuibuilder/gef/commands/Messages.properties | 12 ++ .../gef/commands/MoveAbsolutePartAction.java | 44 +++-- .../gef/commands/ResizeAbsolutePartAction.java | 201 +++++++++++++++++++++ .../gef/commands/ResizeAbsolutePartCommand.java | 102 +++++++++++ .../tizen/webuibuilder/ui/editor/PageDesigner.java | 91 +++++++++- 6 files changed, 440 insertions(+), 22 deletions(-) create mode 100644 org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/ResizeAbsolutePartAction.java create mode 100644 org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/ResizeAbsolutePartCommand.java diff --git a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/Messages.java b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/Messages.java index dd25cd6..dd483c7 100644 --- a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/Messages.java +++ b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/Messages.java @@ -38,6 +38,18 @@ public class Messages extends NLS { public static String ACTION_MOVE_RIGHT; public static String ACTION_MOVE_UP; public static String ACTION_MOVE_DOWN; + public static String ACTION_MOVE_LEFT_DETAIL; + public static String ACTION_MOVE_RIGHT_DETAIL; + public static String ACTION_MOVE_UP_DETAIL; + public static String ACTION_MOVE_DOWN_DETAIL; + public static String ACTION_INC_WIDTH; + public static String ACTION_DEC_WIDTH; + public static String ACTION_INC_HEIGHT; + public static String ACTION_DEC_HEIGHT; + public static String ACTION_INC_WIDTH_DETAIL; + public static String ACTION_DEC_WIDTH_DETAIL; + public static String ACTION_INC_HEIGHT_DETAIL; + public static String ACTION_DEC_HEIGHT_DETAIL; static { NLS.initializeMessages(BUNDLE_NAME, Messages.class); diff --git a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/Messages.properties b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/Messages.properties index 4c50c26..3317daa 100644 --- a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/Messages.properties +++ b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/Messages.properties @@ -6,3 +6,15 @@ ACTION_MOVE_LEFT=MoveLeft\tLeft ACTION_MOVE_RIGHT=MoveRight\tRight ACTION_MOVE_UP=MoveUp\tUp ACTION_MOVE_DOWN=MoveDown\tDown +ACTION_MOVE_LEFT_DETAIL=MoveLeftDetail\tCtrl+Left +ACTION_MOVE_RIGHT_DETAIL=MoveRightDetail\tCtrl+Right +ACTION_MOVE_UP_DETAIL=MoveUpDetail\tCtrl+Up +ACTION_MOVE_DOWN_DETAIL=MoveDownDetail\tCtrl+Down +ACTION_INC_WIDTH=IncWidth\tShift+Right +ACTION_DEC_WIDTH=DecWidth\tShift+Left +ACTION_INC_HEIGHT=IncHeight\tShift+Down +ACTION_DEC_HEIGHT=DecHeight\tShift+Up +ACTION_INC_WIDTH_DETAIL=IncWidth\tCtrl+Shift+Right +ACTION_DEC_WIDTH_DETAIL=DecWidth\tCtrl+Shift+Left +ACTION_INC_HEIGHT_DETAIL=IncHeight\tCtrl+Shift+Down +ACTION_DEC_HEIGHT_DETAIL=DecHeight\tCtrl+Shift+Up diff --git a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/MoveAbsolutePartAction.java b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/MoveAbsolutePartAction.java index 47f5559..4470077 100644 --- a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/MoveAbsolutePartAction.java +++ b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/MoveAbsolutePartAction.java @@ -43,6 +43,7 @@ import org.tizen.webuibuilder.model.Part; public class MoveAbsolutePartAction extends SelectionAction { private int direct = 0; + private int dist = 0; /** * Creates a {@link DeletePartAction} and associates it with the given workbench part. @@ -50,9 +51,10 @@ public class MoveAbsolutePartAction extends SelectionAction { * @param part * the workbench part */ - public MoveAbsolutePartAction(IWorkbenchPart part, int direct) { + public MoveAbsolutePartAction(IWorkbenchPart part, int direct, int dist) { super(part); this.direct = direct; + this.dist = dist; setLazyEnablementCalculation(false); initUi(); } @@ -102,16 +104,16 @@ public class MoveAbsolutePartAction extends SelectionAction { Rectangle delta = new Rectangle(0, 0, 0, 0); switch (direct) { case PositionConstants.LEFT: - delta.x = -10; + delta.x = -dist; break; case PositionConstants.RIGHT: - delta.x = 10; + delta.x = dist; break; case PositionConstants.TOP: - delta.y = -10; + delta.y = -dist; break; case PositionConstants.BOTTOM: - delta.y = 10; + delta.y = dist; break; } @@ -126,16 +128,32 @@ public class MoveAbsolutePartAction extends SelectionAction { private void initUi() { switch (direct) { case PositionConstants.LEFT: - setId(Messages.ACTION_MOVE_LEFT); + if(dist == 10){ + setId(Messages.ACTION_MOVE_LEFT); + } else if(dist == 1){ + setId(Messages.ACTION_MOVE_LEFT_DETAIL); + } break; case PositionConstants.RIGHT: - setId(Messages.ACTION_MOVE_RIGHT); + if(dist == 10){ + setId(Messages.ACTION_MOVE_RIGHT); + } else if(dist == 1){ + setId(Messages.ACTION_MOVE_RIGHT_DETAIL); + } break; case PositionConstants.TOP: - setId(Messages.ACTION_MOVE_UP); + if(dist == 10){ + setId(Messages.ACTION_MOVE_UP); + } else if(dist == 1){ + setId(Messages.ACTION_MOVE_UP_DETAIL); + } break; case PositionConstants.BOTTOM: - setId(Messages.ACTION_MOVE_DOWN); + if(dist == 10){ + setId(Messages.ACTION_MOVE_DOWN); + } else if(dist == 1){ + setId(Messages.ACTION_MOVE_DOWN_DETAIL); + } break; } } @@ -150,16 +168,16 @@ public class MoveAbsolutePartAction extends SelectionAction { ISharedImages images = PlatformUI.getWorkbench().getSharedImages(); switch (direct) { case PositionConstants.LEFT: - setText(Messages.ACTION_MOVE_LEFT); + setText(Messages.ACTION_MOVE_LEFT + " (" + dist + ")"); break; case PositionConstants.RIGHT: - setText(Messages.ACTION_MOVE_RIGHT); + setText(Messages.ACTION_MOVE_RIGHT + " (" + dist + ")"); break; case PositionConstants.TOP: - setText(Messages.ACTION_MOVE_UP); + setText(Messages.ACTION_MOVE_UP + " (" + dist + ")"); break; case PositionConstants.BOTTOM: - setText(Messages.ACTION_MOVE_DOWN); + setText(Messages.ACTION_MOVE_DOWN + " (" + dist + ")"); break; } setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE)); diff --git a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/ResizeAbsolutePartAction.java b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/ResizeAbsolutePartAction.java new file mode 100644 index 0000000..9dd5fc3 --- /dev/null +++ b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/ResizeAbsolutePartAction.java @@ -0,0 +1,201 @@ +/* + * UI Builder + * + * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + + +package org.tizen.webuibuilder.gef.commands; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.draw2d.PositionConstants; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.ui.actions.SelectionAction; +import org.eclipse.ui.ISharedImages; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.PlatformUI; +import org.tizen.webuibuilder.model.Part; + + +/** + * An action to delete selected {@link Part}s. + */ +public class ResizeAbsolutePartAction extends SelectionAction { + + private int direct = 0; + private int dist = 0; + + /** + * Creates a {@link DeletePartAction} and associates it with the given workbench part. + * + * @param part + * the workbench part + */ + public ResizeAbsolutePartAction(IWorkbenchPart part, int direct, int dist) { + super(part); + this.direct = direct; + this.dist = dist; + setLazyEnablementCalculation(false); + initUi(); + } + + /** + * Returns true if the selected objects can be deleted. + * + * @return true if the command should be enabled, and false otherwise + */ + @Override + protected boolean calculateEnabled() { + Command command = createResizeCommand(getSelectedObjects()); + if (command == null) { + return false; + } + + return command.canExecute(); + } + + /** + * Creates a {@link DeletePartCommand}. + * + * @param selectedObjects + * a List containing the currently selected objects + * @return a {@link DeletePartCommand} + */ + private Command createResizeCommand(List selectedObjects) { + if (selectedObjects == null || selectedObjects.isEmpty()) { + return null; + } + + List parts = new ArrayList(); + for (Object obj : selectedObjects) { + if ((obj instanceof EditPart)) { + Object model = ((EditPart) obj).getModel(); + if (model instanceof Part) { + Part part = (Part) model; + parts.add(part); + } + } + } + + if (parts.size() <= 0) { + return null; + } + + Rectangle delta = new Rectangle(0, 0, 0, 0); + switch (direct) { + case PositionConstants.LEFT: + delta.width = -dist; + break; + case PositionConstants.RIGHT: + delta.width = dist; + break; + case PositionConstants.TOP: + delta.height = -dist; + break; + case PositionConstants.BOTTOM: + delta.height = dist; + break; + } + + ResizeAbsolutePartCommand command = new ResizeAbsolutePartCommand(parts.get(0), delta); + + return command; + } + + /** + * Initializes the delete action's text and images. + */ + private void initUi() { + switch (direct) { + case PositionConstants.LEFT: + if(dist == 10){ + setId(Messages.ACTION_DEC_WIDTH); + } else if(dist == 1){ + setId(Messages.ACTION_DEC_WIDTH_DETAIL); + } + break; + case PositionConstants.RIGHT: + if(dist == 10){ + setId(Messages.ACTION_INC_WIDTH); + } else if(dist == 1){ + setId(Messages.ACTION_INC_WIDTH_DETAIL); + } + break; + case PositionConstants.TOP: + if(dist == 10){ + setId(Messages.ACTION_DEC_HEIGHT); + } else if(dist == 1){ + setId(Messages.ACTION_DEC_HEIGHT_DETAIL); + } + break; + case PositionConstants.BOTTOM: + if(dist == 10){ + setId(Messages.ACTION_INC_HEIGHT); + } else if(dist == 1){ + setId(Messages.ACTION_INC_HEIGHT_DETAIL); + } + break; + } + } + + /** + * Initializes the delete action's text and images. + */ + @Override + protected void init() { + super.init(); + + ISharedImages images = PlatformUI.getWorkbench().getSharedImages(); + switch (direct) { + case PositionConstants.LEFT: + setText(Messages.ACTION_DEC_WIDTH + " (" + dist + ")"); + break; + case PositionConstants.RIGHT: + setText(Messages.ACTION_INC_WIDTH + " (" + dist + ")"); + break; + case PositionConstants.TOP: + setText(Messages.ACTION_DEC_HEIGHT + " (" + dist + ")"); + break; + case PositionConstants.BOTTOM: + setText(Messages.ACTION_INC_HEIGHT + " (" + dist + ")"); + break; + } + setHoverImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE)); + setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE)); + setDisabledImageDescriptor(images + .getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED)); + setEnabled(false); + } + + /** + * Performs the delete action on the selected objects. + */ + @Override + public void run() { + Command command = createResizeCommand(getSelectedObjects()); + if (command != null && command.canExecute()) { + execute(command); + } + } + +} diff --git a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/ResizeAbsolutePartCommand.java b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/ResizeAbsolutePartCommand.java new file mode 100644 index 0000000..21b3ee3 --- /dev/null +++ b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/commands/ResizeAbsolutePartCommand.java @@ -0,0 +1,102 @@ +/* + * UI Builder + * + * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + + +package org.tizen.webuibuilder.gef.commands; + +import java.util.List; + +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.gef.commands.Command; +import org.tizen.webuibuilder.model.Part; + + +/** + * The command to move a {@link Part}. + */ +public class ResizeAbsolutePartCommand extends Command { + + private Part model; + private Rectangle delta; + private Rectangle oldLayout; + + /** + * Constructs a {@link ResizeAbsolutePartCommand}. + * + * @param model + * @param layout + */ + public ResizeAbsolutePartCommand(Part model, Rectangle delta) { + oldLayout = model.getPosition(); + + this.model = model; + this.delta = delta; + } + + /** + * Constructs a {@link ResizeAbsolutePartCommand}. + * + * @param model + * @param layout + */ + public ResizeAbsolutePartCommand(List modelList, Rectangle delta) { +// oldLayout = model.getPosition(); +// +// this.model = model; +// this.delta = delta; + } + + /** + * Checks whether a {@link ResizeAbsolutePartCommand} can be executed. + * + * @return true if a {@link ResizeAbsolutePartCommand} can be executed, and + * false otherwise + */ + @Override + public boolean canExecute() { + return super.canExecute(); + } + + /** + * Executes a {@link ResizeAbsolutePartCommand}. + */ + @Override + public void execute() { + if (canExecute()) { + Rectangle layout = new Rectangle(oldLayout); + layout.x += delta.x; + layout.y += delta.y; + layout.width += delta.width; + layout.height += delta.height; + model.setPosition(layout); + } + } + + /** + * Undoes a {@link ResizeAbsolutePartCommand}. + */ + @Override + public void undo() { + model.setPosition(oldLayout); + } + +} diff --git a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/editor/PageDesigner.java b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/editor/PageDesigner.java index 2a53597..1e5cb74 100644 --- a/org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/editor/PageDesigner.java +++ b/org.tizen.webuibuilder/src/org/tizen/webuibuilder/ui/editor/PageDesigner.java @@ -137,6 +137,7 @@ import org.tizen.webuibuilder.gef.commands.DeletePartAction; import org.tizen.webuibuilder.gef.commands.Messages; import org.tizen.webuibuilder.gef.commands.MoveAbsolutePartAction; import org.tizen.webuibuilder.gef.commands.PastePartAction; +import org.tizen.webuibuilder.gef.commands.ResizeAbsolutePartAction; import org.tizen.webuibuilder.gef.editparts.DesignerEditPartFactory; import org.tizen.webuibuilder.gef.editparts.HoverViewerRootEditPart; import org.tizen.webuibuilder.gef.viewer.DesignerBrowserViewer; @@ -438,19 +439,67 @@ public class PageDesigner extends GraphicalEditor implements CommandStackListene actionRegistry.registerAction(action); getSelectionActions().add(action.getId()); - action = new MoveAbsolutePartAction(this, PositionConstants.LEFT); + action = new MoveAbsolutePartAction(this, PositionConstants.LEFT, 10); actionRegistry.registerAction(action); getSelectionActions().add(action.getId()); - action = new MoveAbsolutePartAction(this, PositionConstants.RIGHT); + action = new MoveAbsolutePartAction(this, PositionConstants.RIGHT, 10); actionRegistry.registerAction(action); getSelectionActions().add(action.getId()); - action = new MoveAbsolutePartAction(this, PositionConstants.TOP); + action = new MoveAbsolutePartAction(this, PositionConstants.TOP, 10); actionRegistry.registerAction(action); getSelectionActions().add(action.getId()); - action = new MoveAbsolutePartAction(this, PositionConstants.BOTTOM); + action = new MoveAbsolutePartAction(this, PositionConstants.BOTTOM, 10); + actionRegistry.registerAction(action); + getSelectionActions().add(action.getId()); + + action = new MoveAbsolutePartAction(this, PositionConstants.LEFT, 1); + actionRegistry.registerAction(action); + getSelectionActions().add(action.getId()); + + action = new MoveAbsolutePartAction(this, PositionConstants.RIGHT, 1); + actionRegistry.registerAction(action); + getSelectionActions().add(action.getId()); + + action = new MoveAbsolutePartAction(this, PositionConstants.TOP, 1); + actionRegistry.registerAction(action); + getSelectionActions().add(action.getId()); + + action = new MoveAbsolutePartAction(this, PositionConstants.BOTTOM, 1); + actionRegistry.registerAction(action); + getSelectionActions().add(action.getId()); + + action = new ResizeAbsolutePartAction(this, PositionConstants.LEFT, 10); + actionRegistry.registerAction(action); + getSelectionActions().add(action.getId()); + + action = new ResizeAbsolutePartAction(this, PositionConstants.RIGHT, 10); + actionRegistry.registerAction(action); + getSelectionActions().add(action.getId()); + + action = new ResizeAbsolutePartAction(this, PositionConstants.TOP, 10); + actionRegistry.registerAction(action); + getSelectionActions().add(action.getId()); + + action = new ResizeAbsolutePartAction(this, PositionConstants.BOTTOM, 10); + actionRegistry.registerAction(action); + getSelectionActions().add(action.getId()); + + action = new ResizeAbsolutePartAction(this, PositionConstants.LEFT, 1); + actionRegistry.registerAction(action); + getSelectionActions().add(action.getId()); + + action = new ResizeAbsolutePartAction(this, PositionConstants.RIGHT, 1); + actionRegistry.registerAction(action); + getSelectionActions().add(action.getId()); + + action = new ResizeAbsolutePartAction(this, PositionConstants.TOP, 1); + actionRegistry.registerAction(action); + getSelectionActions().add(action.getId()); + + action = new ResizeAbsolutePartAction(this, PositionConstants.BOTTOM, 1); actionRegistry.registerAction(action); getSelectionActions().add(action.getId()); @@ -876,16 +925,40 @@ public class PageDesigner extends GraphicalEditor implements CommandStackListene private void configureKeyHandler(GraphicalViewer viewer) { KeyHandler keyHandler = new KeyHandler(); //GraphicalViewerKeyHandler keyHandler = new GraphicalViewerKeyHandler(viewer); - keyHandler.put(KeyStroke.getPressed(SWT.DEL, 127, 0), + keyHandler.put(KeyStroke.getPressed(SWT.DEL, 127, SWT.NONE), getActionRegistry().getAction(ActionFactory.DELETE.getId())); - keyHandler.put(KeyStroke.getPressed(SWT.ARROW_LEFT, 0), + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_LEFT, SWT.NONE), getActionRegistry().getAction(Messages.ACTION_MOVE_LEFT)); - keyHandler.put(KeyStroke.getPressed(SWT.ARROW_RIGHT, 0), + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_RIGHT, SWT.NONE), getActionRegistry().getAction(Messages.ACTION_MOVE_RIGHT)); - keyHandler.put(KeyStroke.getPressed(SWT.ARROW_UP, 0), + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_UP, SWT.NONE), getActionRegistry().getAction(Messages.ACTION_MOVE_UP)); - keyHandler.put(KeyStroke.getPressed(SWT.ARROW_DOWN, 0), + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_DOWN, SWT.NONE), getActionRegistry().getAction(Messages.ACTION_MOVE_DOWN)); + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_LEFT, SWT.CTRL), + getActionRegistry().getAction(Messages.ACTION_MOVE_LEFT_DETAIL)); + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_RIGHT, SWT.CTRL), + getActionRegistry().getAction(Messages.ACTION_MOVE_RIGHT_DETAIL)); + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_UP, SWT.CTRL), + getActionRegistry().getAction(Messages.ACTION_MOVE_UP_DETAIL)); + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_DOWN, SWT.CTRL), + getActionRegistry().getAction(Messages.ACTION_MOVE_DOWN_DETAIL)); + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_LEFT, SWT.SHIFT), + getActionRegistry().getAction(Messages.ACTION_DEC_WIDTH)); + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_RIGHT, SWT.SHIFT), + getActionRegistry().getAction(Messages.ACTION_INC_WIDTH)); + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_UP, SWT.SHIFT), + getActionRegistry().getAction(Messages.ACTION_DEC_HEIGHT)); + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_DOWN, SWT.SHIFT), + getActionRegistry().getAction(Messages.ACTION_INC_HEIGHT)); + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_LEFT, SWT.CTRL + SWT.SHIFT), + getActionRegistry().getAction(Messages.ACTION_DEC_WIDTH_DETAIL)); + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_RIGHT, SWT.CTRL + SWT.SHIFT), + getActionRegistry().getAction(Messages.ACTION_INC_WIDTH_DETAIL)); + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_UP, SWT.CTRL + SWT.SHIFT), + getActionRegistry().getAction(Messages.ACTION_DEC_HEIGHT_DETAIL)); + keyHandler.put(KeyStroke.getPressed(SWT.ARROW_DOWN, SWT.CTRL + SWT.SHIFT), + getActionRegistry().getAction(Messages.ACTION_INC_HEIGHT_DETAIL)); designer.setKeyHandler(keyHandler); // designer.setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.CTRL), // PageMouseWheelZoomHandler.SINGLETON); -- 2.7.4