Ignore:
Timestamp:
2024-04-22T20:59:26+02:00 (7 months ago)
Author:
taylor.smock
Message:

Revert most var changes from r19048, fix most new compile warnings and checkstyle issues

Also, document why various ErrorProne checks were originally disabled and fix
generic SonarLint issues.

File:
1 edited

Legend:

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

    r18456 r19050  
    7979     * @author Michael Zangl
    8080     */
    81     private class SelectionHintLayer extends AbstractMapViewPaintable {
     81    private final class SelectionHintLayer extends AbstractMapViewPaintable {
    8282        @Override
    8383        public void paint(Graphics2D g, MapView mv, Bounds bbox) {
     
    186186        if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() > 1 && MainApplication.getLayerManager().getActiveDataSet() != null) {
    187187            SelectByInternalPointAction.performSelection(MainApplication.getMap().mapView.getEastNorth(e.getX(), e.getY()),
    188                     (e.getModifiersEx() & MouseEvent.SHIFT_DOWN_MASK) != 0,
     188                    (e.getModifiersEx() & InputEvent.SHIFT_DOWN_MASK) != 0,
    189189                    (e.getModifiersEx() & PlatformManager.getPlatform().getMenuShortcutKeyMaskEx()) != 0);
    190190        } else if (e.getButton() == MouseEvent.BUTTON1) {
     
    201201    @Override
    202202    public void mouseDragged(MouseEvent e) {
    203         int buttonPressed = e.getModifiersEx() & (MouseEvent.BUTTON1_DOWN_MASK | MouseEvent.BUTTON3_DOWN_MASK);
     203        int buttonPressed = e.getModifiersEx() & (InputEvent.BUTTON1_DOWN_MASK | InputEvent.BUTTON3_DOWN_MASK);
    204204
    205205        if (buttonPressed != 0) {
     
    210210        }
    211211
    212         if (buttonPressed == MouseEvent.BUTTON1_DOWN_MASK) {
     212        if (buttonPressed == InputEvent.BUTTON1_DOWN_MASK) {
    213213            mousePos = e.getPoint();
    214214            addLassoPoint(e.getPoint());
    215215            selectionAreaChanged();
    216         } else if (buttonPressed == (MouseEvent.BUTTON1_DOWN_MASK | MouseEvent.BUTTON3_DOWN_MASK)) {
     216        } else if (buttonPressed == (InputEvent.BUTTON1_DOWN_MASK | InputEvent.BUTTON3_DOWN_MASK)) {
    217217            moveSelection(e.getX()-mousePos.x, e.getY()-mousePos.y);
    218218            mousePos = e.getPoint();
     
    253253
    254254        // Left mouse was released while right is still pressed.
    255         boolean rightMouseStillPressed = (e.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) != 0;
     255        boolean rightMouseStillPressed = (e.getModifiersEx() & InputEvent.BUTTON3_DOWN_MASK) != 0;
    256256
    257257        if (!rightMouseStillPressed) {
     
    317317    @Override
    318318    public void propertyChange(PropertyChangeEvent evt) {
    319         if ("active".equals(evt.getPropertyName()) && !(Boolean) evt.getNewValue()) {
     319        if ("active".equals(evt.getPropertyName()) && Boolean.FALSE.equals(evt.getNewValue())) {
    320320            abortSelecting();
    321321        }
Note: See TracChangeset for help on using the changeset viewer.