Changeset 13036 in josm for trunk


Ignore:
Timestamp:
2017-10-25T20:34:20+02:00 (2 years ago)
Author:
Don-vip
Message:

fix #15484 - Java 9: workaround to https://bugs.openjdk.java.net/browse/JDK-8182577

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java

    r12846 r13036  
    2727
    2828import javax.swing.AbstractAction;
    29 import javax.swing.DefaultButtonModel;
    3029import javax.swing.DefaultListSelectionModel;
    3130import javax.swing.ImageIcon;
     
    3938import javax.swing.JTabbedPane;
    4039import javax.swing.JTable;
     40import javax.swing.JToggleButton.ToggleButtonModel;
    4141import javax.swing.ListSelectionModel;
    4242import javax.swing.SingleSelectionModel;
     
    126126        wfLabel.setLabelFor(cbWireframe);
    127127
    128         cbWireframe.setModel(new DefaultButtonModel() {
     128        cbWireframe.setModel(new ToggleButtonModel() {
    129129            @Override
    130130            public void setSelected(boolean b) {
  • trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java

    r12833 r13036  
    133133     * It previously only implemented (and still could) the {@code ButtonModel} interface.
    134134     * But because of JDK-8182577 (Java 9 regression) it now extends {@code ToggleButtonModel} as a workaround.
    135      * The previous implementation can be restored after Java 10 migration.
    136      * See also https://bugs.openjdk.java.net/browse/JDK-8182695
     135     * The previous implementation can be restored after Java 9 EOL (March 2018).
     136     * See also https://bugs.openjdk.java.net/browse/JDK-8182695 - https://bugs.openjdk.java.net/browse/JDK-8182577
    137137     */
    138138    private final class QuadStateDecorator extends ToggleButtonModel {
Note: See TracChangeset for help on using the changeset viewer.