Changeset 10720 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2016-08-03T17:52:18+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportDialog.java
r10649 r10720 8 8 import java.awt.GridBagConstraints; 9 9 import java.awt.GridBagLayout; 10 10 import java.awt.event.ActionEvent; 11 import java.awt.event.KeyEvent; 12 13 import javax.swing.AbstractAction; 11 14 import javax.swing.BorderFactory; 12 15 import javax.swing.Icon; 13 16 import javax.swing.JButton; 14 17 import javax.swing.JCheckBox; 18 import javax.swing.JComponent; 15 19 import javax.swing.JDialog; 16 20 import javax.swing.JLabel; 17 21 import javax.swing.JPanel; 22 import javax.swing.KeyStroke; 18 23 import javax.swing.UIManager; 19 24 … … 66 71 setModal(true); 67 72 setDefaultCloseOperation(DISPOSE_ON_CLOSE); 73 74 getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "escape"); 75 getRootPane().getActionMap().put("escape", new AbstractAction() { 76 @Override 77 public void actionPerformed(ActionEvent e) { 78 closeDialog(); 79 } 80 }); 68 81 } 69 82
Note:
See TracChangeset
for help on using the changeset viewer.