Changeset 8038 in josm for trunk


Ignore:
Timestamp:
2015-02-10T21:58:44+01:00 (5 years ago)
Author:
Don-vip
Message:

fix #11093 - workaround for Java bug JDK-6322854 in JosmTextField. Use it in CredentialDialog

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

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

    r7083 r8038  
    3737import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
    3838import org.openstreetmap.josm.gui.widgets.JosmPasswordField;
     39import org.openstreetmap.josm.gui.widgets.JosmTextField;
    3940import org.openstreetmap.josm.io.OsmApi;
    4041import org.openstreetmap.josm.tools.ImageProvider;
     
    148149
    149150    protected static class CredentialPanel extends JPanel {
    150         protected JTextField tfUserName;
     151        protected JosmTextField tfUserName;
    151152        protected JosmPasswordField tfPassword;
    152153        protected JCheckBox cbSaveCredentials;
     
    156157
    157158        protected void build() {
    158             tfUserName = new JTextField(20);
     159            tfUserName = new JosmTextField(20);
    159160            tfPassword = new JosmPasswordField(20);
    160161            tfUserName.addFocusListener(new SelectAllOnFocusHandler());
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java

    r8005 r8038  
    2121 * <li>adds an optional "hint" displayed when no text has been entered</li>
    2222 * <li>disables the global advanced key press detector when focused</li>
     23 * <li>implements a workaround to <a href="https://bugs.openjdk.java.net/browse/JDK-6322854">JDK bug 6322854</a></li>
    2324 * <br>This class must be used everywhere in core and plugins instead of {@code JTextField}.
    2425 * @since 5886
     
    7374        }
    7475        addFocusListener(this);
     76        // Workaround for Java bug 6322854
     77        JosmPasswordField.workaroundJdkBug6322854(this);
    7578    }
    7679
Note: See TracChangeset for help on using the changeset viewer.