Skip to content
Snippets Groups Projects
Commit 3e1be585 authored by Fabien Tessier's avatar Fabien Tessier
Browse files

#Issue 70: Copy backspace behaviour to suppr key

parent fe2192c7
No related branches found
No related tags found
No related merge requests found
......@@ -112,6 +112,8 @@ public class ActionPerformer {
mgui.paste();
} else if (command.equals(mgui.actions[TGUIAction.ACT_DELETE].getActionCommand())) {
mgui.delete();
} else if (command.equals(mgui.actions[TGUIAction.ACT_SUPPR].getActionCommand())) {
mgui.delete();
} else if (command.equals(mgui.actions[TGUIAction.ACT_ZOOM_MORE].getActionCommand())) {
mgui.zoomMore();
} else if (command.equals(mgui.actions[TGUIAction.ACT_ZOOM_LESS].getActionCommand())) {
......
......@@ -171,6 +171,8 @@ public class JMenuBarTurtle extends JMenuBar {
menuItem.addMouseListener(mgui.mouseHandler);
menuItem = edit.add(mgui.actions[TGUIAction.ACT_DELETE]);
menuItem.addMouseListener(mgui.mouseHandler);
menuItem = edit.add(mgui.actions[TGUIAction.ACT_SUPPR]);
menuItem.addMouseListener(mgui.mouseHandler);
edit.addSeparator();
......
......@@ -107,6 +107,8 @@ public class JToolBarMainTurtle extends JToolBar implements ActionListener
button.addMouseListener(mgui.mouseHandler);
button = add(mgui.actions[TGUIAction.ACT_DELETE]);
button.addMouseListener(mgui.mouseHandler);
button = add(mgui.actions[TGUIAction.ACT_SUPPR]);
button.addMouseListener(mgui.mouseHandler);
addSeparator();
......
......@@ -120,6 +120,8 @@ public class ModeManager {
actions[TGUIAction.ACT_GENERATE_ONTOLOGIES_CURRENT_SET_OF_DIAGRAMS].setEnabled(true);
actions[TGUIAction.ACT_GENERATE_ONTOLOGIES_ALL_DIAGRAMS].setEnabled(true);
actions[TGUIAction.ACT_DELETE].setEnabled(true);
actions[TGUIAction.ACT_SUPPR].setEnabled(true);
if (mainBar != null) {
mainBar.activateSearch(true);
}
......
......@@ -551,6 +551,7 @@ public class TGUIAction extends AbstractAction {
public static final int ACT_COPY = 45;
public static final int ACT_PASTE = 46;
public static final int ACT_DELETE = 47;
public static final int ACT_SUPPR = 462; //Last added input
public static final int ACT_ZOOM_MORE = 235;
public static final int ACT_ZOOM_LESS = 236;
......@@ -614,7 +615,7 @@ public class TGUIAction extends AbstractAction {
public static final int ACT_INTERNAL_SEARCH = 415;
//--
public static final int NB_ACTION = 462;
public static final int NB_ACTION = 463;
private static final TAction [] actions = new TAction[NB_ACTION];
......@@ -692,6 +693,7 @@ public class TGUIAction extends AbstractAction {
actions[ACT_CUT] = new TAction("cut-command", "Cut",IconManager.imgic330, IconManager.imgic331, "Cut", "Cut selected components", 'X', true);
actions[ACT_COPY] = new TAction("copy-command", "Copy", IconManager.imgic332, IconManager.imgic333, "Copy", "Copy selected components", 'C', true);
actions[ACT_PASTE] = new TAction("paste-command", "Paste",IconManager.imgic334, IconManager.imgic335, "Paste", "Paste - if possible - previously cut / copied components at the minimal position of the currently opened diagram", 'V', true);
actions[ACT_SUPPR] = new TAction("delete-command", "Delete", IconManager.imgic336, IconManager.imgic337, "Delete", "Delete selected components", KeyEvent.VK_DELETE);
actions[ACT_DELETE] = new TAction("delete-command", "Delete", IconManager.imgic336, IconManager.imgic337, "Delete", "Delete selected components", KeyEvent.VK_BACK_SPACE);
actions[ACT_ZOOM_MORE] = new TAction("zoommore-command", "Zoom +", IconManager.imgic316, IconManager.imgic317, "Zoom +", "Zoom +", '0');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment