- Timestamp:
- 2012-03-01T12:43:17+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r5020 r5032 19 19 import java.awt.event.FocusAdapter; 20 20 import java.awt.event.FocusEvent; 21 import java.awt.event.InputEvent; 21 22 import java.awt.event.KeyEvent; 22 23 import java.awt.event.MouseAdapter; … … 46 47 import javax.swing.Box; 47 48 import javax.swing.DefaultListCellRenderer; 49 import javax.swing.InputMap; 48 50 import javax.swing.JComboBox; 49 51 import javax.swing.JComponent; … … 59 61 import javax.swing.KeyStroke; 60 62 import javax.swing.ListSelectionModel; 63 import javax.swing.SwingUtilities; 61 64 import javax.swing.event.ListSelectionEvent; 62 65 import javax.swing.event.ListSelectionListener; … … 840 843 .put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, 0),"onTableInsert"); 841 844 propertyTable.getActionMap().put("onTableInsert",addAction); 842 845 846 // unassign some standard shortcuts for JTable to allow upload / download 847 InputMap inputMap=SwingUtilities.getUIInputMap(propertyTable,JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); 848 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP,InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK)); 849 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK)); 850 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP,InputEvent.ALT_MASK|InputEvent.SHIFT_MASK)); 851 inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,InputEvent.ALT_MASK|InputEvent.SHIFT_MASK)); 852 SwingUtilities.replaceUIInputMap(propertyTable,JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,inputMap); 853 843 854 // -- add action and shortcut 844 855 this.btnAdd = new SideButton(addAction);
Note:
See TracChangeset
for help on using the changeset viewer.