Ignore:
Timestamp:
2016-03-17T01:50:12+01:00 (8 years ago)
Author:
Don-vip
Message:

sonar - Local variable and method parameter names should comply with a naming convention

Location:
trunk/src/org/openstreetmap/josm/gui/bbox
Files:
2 edited

Legend:

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

    r9983 r10001  
    240240            return;
    241241
    242         Point p_max = new Point(Math.max(aEnd.x, aStart.x), Math.max(aEnd.y, aStart.y));
    243         Point p_min = new Point(Math.min(aEnd.x, aStart.x), Math.min(aEnd.y, aStart.y));
    244 
    245         iSelectionRectStart = getPosition(p_min);
    246         iSelectionRectEnd =   getPosition(p_max);
     242        Point pMax = new Point(Math.max(aEnd.x, aStart.x), Math.max(aEnd.y, aStart.y));
     243        Point pMin = new Point(Math.min(aEnd.x, aStart.x), Math.min(aEnd.y, aStart.y));
     244
     245        iSelectionRectStart = getPosition(pMin);
     246        iSelectionRectEnd =   getPosition(pMax);
    247247
    248248        Bounds b = new Bounds(
  • trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java

    r9078 r10001  
    154154
    155155        // calc the screen coordinates for the new selection rectangle
    156         MapMarkerDot xmin_ymin = new MapMarkerDot(bbox.getMinLat(), bbox.getMinLon());
    157         MapMarkerDot xmax_ymax = new MapMarkerDot(bbox.getMaxLat(), bbox.getMaxLon());
    158 
    159156        List<MapMarker> marker = new ArrayList<>(2);
    160         marker.add(xmin_ymin);
    161         marker.add(xmax_ymax);
     157        marker.add(new MapMarkerDot(bbox.getMinLat(), bbox.getMinLon()));
     158        marker.add(new MapMarkerDot(bbox.getMaxLat(), bbox.getMaxLon()));
    162159        mapViewer.setBoundingBox(bbox);
    163160        mapViewer.setMapMarkerList(marker);
     
    704701                int zoomDiff = MAX_ZOOM - zoom;
    705702                Point tlc = getTopLeftCoordinates();
    706                 int x_min = (min.x >> zoomDiff) - tlc.x;
    707                 int y_min = (min.y >> zoomDiff) - tlc.y;
    708                 int x_max = (max.x >> zoomDiff) - tlc.x;
    709                 int y_max = (max.y >> zoomDiff) - tlc.y;
    710 
    711                 int w = x_max - x_min;
    712                 int h = y_max - y_min;
     703                int xMin = (min.x >> zoomDiff) - tlc.x;
     704                int yMin = (min.y >> zoomDiff) - tlc.y;
     705                int xMax = (max.x >> zoomDiff) - tlc.x;
     706                int yMax = (max.y >> zoomDiff) - tlc.y;
     707
     708                int w = xMax - xMin;
     709                int h = yMax - yMin;
    713710                g.setColor(new Color(0.9f, 0.7f, 0.7f, 0.6f));
    714                 g.fillRect(x_min, y_min, w, h);
     711                g.fillRect(xMin, yMin, w, h);
    715712
    716713                g.setColor(Color.BLACK);
    717                 g.drawRect(x_min, y_min, w, h);
     714                g.drawRect(xMin, yMin, w, h);
    718715            } catch (Exception e) {
    719716                Main.error(e);
Note: See TracChangeset for help on using the changeset viewer.