Ignore:
Timestamp:
2016-08-12T21:08:00+02:00 (8 years ago)
Author:
simon04
Message:

see #13319 - Use InputMapUtils where applicable (VK_ESCAPE)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java

    r10783 r10791  
    1212import java.awt.GridBagLayout;
    1313import java.awt.event.ActionEvent;
    14 import java.awt.event.KeyEvent;
    1514import java.awt.event.WindowAdapter;
    1615import java.awt.event.WindowEvent;
     
    3130import javax.swing.Icon;
    3231import javax.swing.JButton;
    33 import javax.swing.JComponent;
    3432import javax.swing.JOptionPane;
    3533import javax.swing.JPanel;
    3634import javax.swing.JTabbedPane;
    37 import javax.swing.KeyStroke;
    3835
    3936import org.openstreetmap.josm.Main;
     
    189186        CancelAction cancelAction = new CancelAction(this);
    190187        pnl.add(new JButton(cancelAction));
    191         getRootPane().registerKeyboardAction(
    192                 cancelAction,
    193                 KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
    194                 JComponent.WHEN_IN_FOCUSED_WINDOW
    195         );
     188        InputMapUtils.addEscapeAction(getRootPane(), cancelAction);
    196189        pnl.add(new JButton(new ContextSensitiveHelpAction(ht("/Dialog/Upload"))));
    197190        HelpUtil.setHelpContext(getRootPane(), ht("/Dialog/Upload"));
Note: See TracChangeset for help on using the changeset viewer.