- Timestamp:
- 2011-08-08T00:18:01+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java
r3768 r4297 9 9 import java.awt.FlowLayout; 10 10 import java.awt.event.ActionEvent; 11 import java.awt.event.KeyEvent; 11 12 import java.awt.event.WindowAdapter; 12 13 import java.awt.event.WindowEvent; 13 14 14 15 import javax.swing.AbstractAction; 16 import javax.swing.JComponent; 15 17 import javax.swing.JDialog; 16 18 import javax.swing.JOptionPane; 17 19 import javax.swing.JPanel; 20 import javax.swing.KeyStroke; 18 21 19 22 import org.openstreetmap.josm.Main; … … 73 76 74 77 btn = new SideButton(closeAction = new CloseAction()); 78 final String closeHistoryBrowserDialogKey = "CloseHistoryBrowserDialog"; 79 KeyStroke escapeKey = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false); 80 getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(escapeKey, closeHistoryBrowserDialogKey); 81 getRootPane().getActionMap().put(closeHistoryBrowserDialogKey, closeAction); 75 82 btn.setName("btn.close"); 76 83 pnl.add(btn);
Note:
See TracChangeset
for help on using the changeset viewer.