Ignore:
Timestamp:
2016-07-26T22:39:12+02:00 (8 years ago)
Author:
donvip
Message:

error-prone - fix warning OperatorPrecedence + javadoc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java

    r32602 r32724  
    3737    private boolean doubleClickZoomEnabled = true;
    3838
     39    /**
     40     * Constructs a new {@code DefaultMapController}.
     41     * @param map map panel
     42     */
    3943    public DefaultMapController(JMapViewer map) {
    4044        super(map);
     
    4751        // Is only the selected mouse button pressed?
    4852        if ((e.getModifiersEx() & MOUSE_BUTTONS_MASK) == movementMouseButtonMask
    49                 || isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK) {
     53                || (isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK)) {
    5054            Point p = e.getPoint();
    5155            if (lastDragPoint != null) {
     
    6771    @Override
    6872    public void mousePressed(MouseEvent e) {
    69         if (e.getButton() == movementMouseButton || isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK) {
     73        if (e.getButton() == movementMouseButton || (isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK)) {
    7074            lastDragPoint = null;
    7175            isMoving = true;
     
    7579    @Override
    7680    public void mouseReleased(MouseEvent e) {
    77         if (e.getButton() == movementMouseButton || isPlatformOsx() && e.getButton() == MouseEvent.BUTTON1) {
     81        if (e.getButton() == movementMouseButton || (isPlatformOsx() && e.getButton() == MouseEvent.BUTTON1)) {
    7882            lastDragPoint = null;
    7983            isMoving = false;
     
    8993    }
    9094
     95    /**
     96     * Determines if the map pane is allowed to be moved using the mouse
     97     * @return {@code true} to allow the map pane to be moved using the mouse
     98     */
    9199    public boolean isMovementEnabled() {
    92100        return movementEnabled;
     
    151159    @Override
    152160    public void mouseEntered(MouseEvent e) {
     161        // do nothing
    153162    }
    154163
    155164    @Override
    156165    public void mouseExited(MouseEvent e) {
     166        // do nothing
    157167    }
    158168
     
    174184                lastDragPoint = p;
    175185            }
    176 
    177186        }
    178 
    179187    }
    180188
Note: See TracChangeset for help on using the changeset viewer.