Skip to content
Snippets Groups Projects
Commit 8c9474cc authored by Ludovic Apvrille's avatar Ludovic Apvrille
Browse files

Merge branch 'question_mark' into 'master'

handled "esc" key for the Pragmas

See merge request !117
parents 7fee4730 58fe07b0
No related branches found
No related tags found
1 merge request!117handled "esc" key for the Pragmas
...@@ -385,6 +385,15 @@ public class JDialogPerformancePragma extends JDialogBase implements ActionListe ...@@ -385,6 +385,15 @@ public class JDialogPerformancePragma extends JDialogBase implements ActionListe
help(); help();
} }
}); });
helpPopup.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "closeJlabel");
helpPopup.getActionMap().put("closeJlabel", new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
helpPopup.setVisible(false);
}
});
JPanel jp = new JPanel(); JPanel jp = new JPanel();
jp.add(cancel); jp.add(cancel);
jp.add(close); jp.add(close);
......
...@@ -365,6 +365,15 @@ public class JDialogSafetyPragma extends JDialogBase implements ActionListener { ...@@ -365,6 +365,15 @@ public class JDialogSafetyPragma extends JDialogBase implements ActionListener {
help(); help();
} }
}); });
helpPopup.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "closeJlabel");
helpPopup.getActionMap().put("closeJlabel", new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
helpPopup.setVisible(false);
}
});
JPanel jp = new JPanel(); JPanel jp = new JPanel();
jp.add(cancel); jp.add(cancel);
jp.add(close); jp.add(close);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment