Skip to content

Commit

Permalink
fix #21488 - make our custom checkbox models extend ToggleButtonModel…
Browse files Browse the repository at this point in the history
… so that Java 8u311 is happy

git-svn-id: https://josm.openstreetmap.de/svn/trunk@18311 0c6e7542-c601-0410-84e7-c038aed88b3b
  • Loading branch information
don-vip committed Nov 6, 2021
1 parent 27c7a62 commit c598f51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.util.List;

import javax.swing.AbstractAction;
import javax.swing.DefaultButtonModel;
import javax.swing.DefaultListSelectionModel;
import javax.swing.ImageIcon;
import javax.swing.JCheckBox;
Expand All @@ -37,6 +36,7 @@
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.JToggleButton.ToggleButtonModel;
import javax.swing.ListSelectionModel;
import javax.swing.SingleSelectionModel;
import javax.swing.SwingConstants;
Expand Down Expand Up @@ -125,7 +125,7 @@ protected void build() {
wfLabel.setFont(wfLabel.getFont().deriveFont(Font.PLAIN));
wfLabel.setLabelFor(cbWireframe);

cbWireframe.setModel(new DefaultButtonModel() {
cbWireframe.setModel(new ToggleButtonModel() {
@Override
public void setSelected(boolean b) {
super.setSelected(b);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void setSelected(boolean b) {
/**
* Button model for the {@code QuadStateCheckBox}.
*/
private final class QuadStateDecorator implements ButtonModel {
private final class QuadStateDecorator extends ToggleButtonModel {
private final ButtonModel other;
private String propertyText;

Expand Down

0 comments on commit c598f51

Please sign in to comment.