Changeset 15287 in josm


Ignore:
Timestamp:
2019-08-07T01:13:11+02:00 (2 weeks ago)
Author:
Don-vip
Message:

see #15294, see #15484 - code cleanup, revert r12829 / r13036 now that Java 9 is EOL

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

Legend:

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

    r14153 r15287  
    2727
    2828import javax.swing.AbstractAction;
     29import javax.swing.DefaultButtonModel;
    2930import javax.swing.DefaultListSelectionModel;
    3031import javax.swing.ImageIcon;
     
    3839import javax.swing.JTabbedPane;
    3940import javax.swing.JTable;
    40 import javax.swing.JToggleButton.ToggleButtonModel;
    4141import javax.swing.ListSelectionModel;
    4242import javax.swing.SingleSelectionModel;
     
    125125        wfLabel.setLabelFor(cbWireframe);
    126126
    127         cbWireframe.setModel(new ToggleButtonModel() {
     127        cbWireframe.setModel(new DefaultButtonModel() {
    128128            @Override
    129129            public void setSelected(boolean b) {
  • trunk/src/org/openstreetmap/josm/gui/widgets/NativeFileChooser.java

    r14153 r15287  
    44import java.awt.Component;
    55import java.awt.FileDialog;
    6 import java.awt.Frame;
    76import java.io.File;
    87import java.io.FilenameFilter;
     
    3534     */
    3635    public NativeFileChooser(File file) {
    37         fileDialog = new FileDialog((Frame) MainApplication.getMainFrame());
     36        fileDialog = new FileDialog(MainApplication.getMainFrame());
    3837        if (file != null) {
    3938            fileDialog.setDirectory(file.getAbsolutePath());
  • trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java

    r13036 r15287  
    131131    /**
    132132     * Button model for the {@code QuadStateCheckBox}.
    133      * It previously only implemented (and still could) the {@code ButtonModel} interface.
    134      * 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 9 EOL (March 2018).
    136      * See also https://bugs.openjdk.java.net/browse/JDK-8182695 - https://bugs.openjdk.java.net/browse/JDK-8182577
    137      */
    138     private final class QuadStateDecorator extends ToggleButtonModel {
     133     */
     134    private final class QuadStateDecorator implements ButtonModel {
    139135        private final ButtonModel other;
    140136        private String propertyText;
Note: See TracChangeset for help on using the changeset viewer.