- Timestamp:
- 2013-12-28T23:23:40+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r6546 r6557 446 446 tagTable.getActionMap().put("onTableInsert",addAction); 447 447 448 // unassign some standard shortcuts for JTable to allow upload / download 448 // unassign some standard shortcuts for JTable to allow upload / download / image browsing 449 449 InputMapUtils.unassignCtrlShiftUpDown(tagTable, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); 450 InputMapUtils.unassignPageUpDown(tagTable, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); 450 451 451 452 // unassign some standard shortcuts for correct copy-pasting, fix #8508 -
trunk/src/org/openstreetmap/josm/tools/InputMapUtils.java
r6362 r6557 22 22 } 23 23 24 /** 25 * Unassign Ctrl-Shift/Alt-Shift Up/Down from the given component 26 * to allow global JOSM shortcuts to work in this component. 27 * @param cmp The Swing component 28 * @param condition one of the following values: 29 * <ul> 30 * <li>JComponent.FOCUS_INPUTMAP_CREATED 31 * <li>JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT 32 * <li>JComponent.WHEN_IN_FOCUSED_WINDOW 33 * </ul> 34 */ 24 35 public static void unassignCtrlShiftUpDown(JComponent cmp, int condition) { 25 36 InputMap inputMap=SwingUtilities.getUIInputMap(cmp, condition); … … 29 40 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,InputEvent.ALT_MASK|InputEvent.SHIFT_MASK)); 30 41 SwingUtilities.replaceUIInputMap(cmp,JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,inputMap); 42 } 43 44 /** 45 * Unassign PageUp/PageDown from the given component 46 * to allow global JOSM shortcuts to work in this component. 47 * @param cmp The Swing component 48 * @param condition one of the following values: 49 * <ul> 50 * <li>JComponent.FOCUS_INPUTMAP_CREATED 51 * <li>JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT 52 * <li>JComponent.WHEN_IN_FOCUSED_WINDOW 53 * </ul> 54 * @since 6557 55 */ 56 public static void unassignPageUpDown(JComponent cmp, int condition) { 57 InputMap inputMap = SwingUtilities.getUIInputMap(cmp, condition); 58 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0)); 59 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0)); 60 SwingUtilities.replaceUIInputMap(cmp, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, inputMap); 31 61 } 32 62
Note:
See TracChangeset
for help on using the changeset viewer.