Revision 39408
branches/v2_0_0_prep/libraries/libCorePlugin/src/org/gvsig/coreplugin/mdiManager/WindowStackSupport.java | ||
---|---|---|
76 | 76 |
key_free[i] = true; |
77 | 77 |
} |
78 | 78 |
key = new java.lang.String[10]; |
79 |
key[0] = "1"; |
|
80 |
key[1] = "2"; |
|
81 |
key[2] = "3"; |
|
82 |
key[3] = "4"; |
|
83 |
key[4] = "5"; |
|
84 |
key[5] = "6"; |
|
85 |
key[6] = "7"; |
|
86 |
key[7] = "8"; |
|
87 |
key[8] = "9"; |
|
88 |
key[9] = "0"; |
|
79 |
/* |
|
80 |
* We need to add CTRL modifier because |
|
81 |
* our key stroke manager will |
|
82 |
* not add default modifier (because we need to |
|
83 |
* deal with F3, F7, etc, not CTRL+F3 etc) |
|
84 |
*/ |
|
85 |
key[0] = "ctrl+1"; |
|
86 |
key[1] = "ctrl+2"; |
|
87 |
key[2] = "ctrl+3"; |
|
88 |
key[3] = "ctrl+4"; |
|
89 |
key[4] = "ctrl+5"; |
|
90 |
key[5] = "ctrl+6"; |
|
91 |
key[6] = "ctrl+7"; |
|
92 |
key[7] = "ctrl+8"; |
|
93 |
key[8] = "ctrl+9"; |
|
94 |
key[9] = "ctrl+0"; |
|
89 | 95 |
} |
90 | 96 |
|
91 | 97 |
public void add(IWindow v, final ActionListener listener) { |
branches/v2_0_0_prep/frameworks/_fwAndami/src/org/gvsig/andami/Launcher.java | ||
---|---|---|
1319 | 1319 |
actionInfo = actionManager.createAction( |
1320 | 1320 |
classExtension, action.getName(), |
1321 | 1321 |
action.getLabel(), action.getActionCommand(), |
1322 |
action.getIcon(), null, action.getPosition(),
|
|
1322 |
action.getIcon(), action.getAccelerator(), action.getPosition(),
|
|
1323 | 1323 |
action.getTooltip()); |
1324 | 1324 |
actionManager.registerAction(actionInfo); |
1325 | 1325 |
if( action.getPosition() < 100000000 ) { |
... | ... | |
1390 | 1390 |
actionTool.getText(), |
1391 | 1391 |
actionTool.getActionCommand(), |
1392 | 1392 |
actionTool.getIcon(), |
1393 |
actionTool.getEnableText(),
|
|
1393 |
null,
|
|
1394 | 1394 |
actionTool.getPosition(), |
1395 | 1395 |
actionTool.getTooltip()); |
1396 | 1396 |
actionInfo = actionManager.registerAction(actionInfo); |
branches/v2_0_0_prep/frameworks/_fwAndami/src/org/gvsig/andami/actioninfo/impl/DefaultActionInfoManager.java | ||
---|---|---|
21 | 21 |
private Map<String, ActionInfo>actions = new HashMap<String, ActionInfo>(); |
22 | 22 |
private int anonymousCounter = 1; |
23 | 23 |
|
24 |
public ActionInfo createAction(Class<? extends IExtension> extension, String name, String text, String command, String icon, String enableText, long position, String tip) {
|
|
24 |
public ActionInfo createAction(Class<? extends IExtension> extension, String name, String text, String command, String icon, String accelerator, long position, String tip) {
|
|
25 | 25 |
name = emptyToNull(name); |
26 | 26 |
String actionName = name; |
27 | 27 |
if( actionName==null ){ |
28 | 28 |
actionName = String.format("anonymous__%04d",this.anonymousCounter++); |
29 | 29 |
} |
30 |
ActionInfo action = new DefaultActionInfo(extension, actionName, text, command, icon, enableText, position, tip);
|
|
30 |
ActionInfo action = new DefaultActionInfo(extension, actionName, text, command, icon, accelerator, position, tip);
|
|
31 | 31 |
ActionInfo previous = this.getAction(action.getName()); |
32 | 32 |
if( previous != null ) { |
33 | 33 |
((DefaultActionInfo)action).merge(previous); |
branches/v2_0_0_prep/frameworks/_fwAndami/src/org/gvsig/andami/ui/mdiFrame/KeyMapping.java | ||
---|---|---|
104 | 104 |
keys.put("9", new Integer(KeyEvent.VK_9)); |
105 | 105 |
keys.put("+", new Integer(KeyEvent.VK_PLUS)); |
106 | 106 |
keys.put("-", new Integer(KeyEvent.VK_MINUS)); |
107 |
keys.put("F1", new Integer(KeyEvent.VK_F1));
|
|
108 |
keys.put("F2", new Integer(KeyEvent.VK_F2));
|
|
109 |
keys.put("F3", new Integer(KeyEvent.VK_F3));
|
|
110 |
keys.put("F4", new Integer(KeyEvent.VK_F4));
|
|
111 |
keys.put("F5", new Integer(KeyEvent.VK_F5));
|
|
112 |
keys.put("F6", new Integer(KeyEvent.VK_F6));
|
|
113 |
keys.put("F7", new Integer(KeyEvent.VK_F7));
|
|
114 |
keys.put("F8", new Integer(KeyEvent.VK_F8));
|
|
115 |
keys.put("F9", new Integer(KeyEvent.VK_F9));
|
|
116 |
keys.put("F10", new Integer(KeyEvent.VK_F10));
|
|
117 |
keys.put("F11", new Integer(KeyEvent.VK_F11));
|
|
118 |
keys.put("F12", new Integer(KeyEvent.VK_F12));
|
|
119 |
keys.put("DELETE", new Integer(KeyEvent.VK_DELETE));
|
|
107 |
keys.put("f1", new Integer(KeyEvent.VK_F1));
|
|
108 |
keys.put("f2", new Integer(KeyEvent.VK_F2));
|
|
109 |
keys.put("f3", new Integer(KeyEvent.VK_F3));
|
|
110 |
keys.put("f4", new Integer(KeyEvent.VK_F4));
|
|
111 |
keys.put("f5", new Integer(KeyEvent.VK_F5));
|
|
112 |
keys.put("f6", new Integer(KeyEvent.VK_F6));
|
|
113 |
keys.put("f7", new Integer(KeyEvent.VK_F7));
|
|
114 |
keys.put("f8", new Integer(KeyEvent.VK_F8));
|
|
115 |
keys.put("f9", new Integer(KeyEvent.VK_F9));
|
|
116 |
keys.put("f10", new Integer(KeyEvent.VK_F10));
|
|
117 |
keys.put("f11", new Integer(KeyEvent.VK_F11));
|
|
118 |
keys.put("f12", new Integer(KeyEvent.VK_F12));
|
|
119 |
keys.put("delete", new Integer(KeyEvent.VK_DELETE));
|
|
120 | 120 |
} |
121 | 121 |
|
122 | 122 |
/** |
... | ... | |
178 | 178 |
if( key == 0 ) { |
179 | 179 |
return null; |
180 | 180 |
} |
181 |
/* |
|
182 |
* We are not adding default modifier, this means |
|
183 |
* short cuts must come with modifiers explicitly |
|
184 |
* except special keys like F3, F7, etc |
|
185 |
*/ |
|
186 |
/* |
|
181 | 187 |
if( modifiers == 0 ) { |
182 | 188 |
modifiers = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); |
183 | 189 |
} |
190 |
*/ |
|
184 | 191 |
return KeyStroke.getKeyStroke(key,modifiers); |
185 | 192 |
} |
186 | 193 |
} |
Also available in: Unified diff