Changeset 17649 in josm for trunk/src


Ignore:
Timestamp:
2021-03-23T23:31:52+01:00 (3 years ago)
Author:
simon04
Message:

Extract QuadStateCheckBox.nextState

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java

    r16913 r17649  
    5050        public void mousePressed(MouseEvent e) {
    5151            if (SwingUtilities.isLeftMouseButton(e)) {
    52                 grabFocus();
    53                 cbModel.nextState();
     52                nextState();
    5453            }
    5554        }
     
    7372            @Override
    7473            public void actionPerformed(ActionEvent e) {
    75                 grabFocus();
    76                 cbModel.nextState();
     74                nextState();
    7775            }
    7876        });
     
    132130    public State getState() {
    133131        return cbModel.getState();
     132    }
     133
     134    /**
     135     * Rotate to the next allowed state.
     136     */
     137    public void nextState() {
     138        grabFocus();
     139        cbModel.nextState();
    134140    }
    135141
Note: See TracChangeset for help on using the changeset viewer.