Changeset 12520 in josm for trunk/src/org
- Timestamp:
- 2017-07-26T23:53:08+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/InputMapUtils.java
r10791 r12520 35 35 public static void unassignCtrlShiftUpDown(JComponent cmp, int condition) { 36 36 InputMap inputMap = SwingUtilities.getUIInputMap(cmp, condition); 37 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.CTRL_ MASK | InputEvent.SHIFT_MASK));38 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.CTRL_ MASK | InputEvent.SHIFT_MASK));39 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.ALT_ MASK | InputEvent.SHIFT_MASK));40 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.ALT_ MASK | InputEvent.SHIFT_MASK));37 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK)); 38 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK)); 39 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.ALT_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK)); 40 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.ALT_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK)); 41 41 SwingUtilities.replaceUIInputMap(cmp, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, inputMap); 42 42 } -
trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java
r11366 r12520 198 198 199 199 private static String formatMenuText(KeyStroke keyStroke, String index, String description) { 200 String shortcutText = KeyEvent.getKeyModifiersText(keyStroke.getModifiers()) + '+' 201 + KeyEvent.getKeyText(keyStroke.getKeyCode()) + ',' + index; 200 String shortcutText = Shortcut.getKeyText(keyStroke) + ',' + index; 202 201 203 202 return "<html><i>" + shortcutText + "</i> " + description; -
trunk/src/org/openstreetmap/josm/tools/Shortcut.java
r12519 r12520 254 254 */ 255 255 public String getKeyText() { 256 KeyStroke keyStroke = getKeyStroke(); 256 return getKeyText(getKeyStroke()); 257 } 258 259 /** 260 * Returns a human readable text for the key stroke. 261 * @param keyStroke key stroke to convert to human readable text 262 * @return a human readable text for the key stroke 263 * @since 12520 264 */ 265 public static String getKeyText(KeyStroke keyStroke) { 257 266 if (keyStroke == null) return ""; 258 267 String modifText = KeyEvent.getModifiersExText(keyStroke.getModifiers());
Note:
See TracChangeset
for help on using the changeset viewer.