- Timestamp:
- 2014-09-16T19:15:00+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
r7434 r7545 11 11 import java.awt.Toolkit; 12 12 import java.awt.event.ActionEvent; 13 import java.awt.event.KeyEvent; 13 14 import java.util.ArrayList; 14 15 import java.util.Arrays; … … 209 210 * 210 211 * @param content Any element that can be displayed in the message dialog 211 * @param placeContentInScrollPane if true, placesthe content in a JScrollPane212 * @param placeContentInScrollPane if true, places the content in a JScrollPane 212 213 * @return {@code this} 213 214 */ … … 447 448 private void setupEscListener() { 448 449 Action actionListener = new AbstractAction() { 449 @Override public void actionPerformed(ActionEvent actionEvent) { 450 @Override 451 public void actionPerformed(ActionEvent actionEvent) { 450 452 // 0 means that the dialog has been closed otherwise. 451 453 // We need to set it to zero again, in case the dialog has been re-used … … 608 610 /** 609 611 * Convenience function that converts a given string into a JMultilineLabel 610 * @param msg 611 * @return JMultilineLabel 612 * @param msg the message to display 613 * @return JMultilineLabel displaying {@code msg} 612 614 */ 613 615 private static JMultilineLabel string2label(String msg) { … … 616 618 Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); 617 619 lbl.setMaxWidth(screenSize.width/2); 620 // Disable default Enter key binding to allow dialog's one (then enables to hit default button from here) 621 lbl.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), new Object()); 618 622 return lbl; 619 623 }
Note:
See TracChangeset
for help on using the changeset viewer.