Changeset 31791 in osm


Ignore:
Timestamp:
2015-12-03T00:56:12+01:00 (9 years ago)
Author:
donvip
Message:

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

Location:
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer
Files:
5 edited

Legend:

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

    r31790 r31791  
    538538        int tilex = center.x / tilesize;
    539539        int tiley = center.y / tilesize;
    540         int off_x = center.x % tilesize;
    541         int off_y = center.y % tilesize;
     540        int offsx = center.x % tilesize;
     541        int offsy = center.y % tilesize;
    542542
    543543        int w2 = getWidth() / 2;
    544544        int h2 = getHeight() / 2;
    545         int posx = w2 - off_x;
    546         int posy = h2 - off_y;
    547 
    548         int diff_left = off_x;
    549         int diff_right = tilesize - off_x;
    550         int diff_top = off_y;
    551         int diff_bottom = tilesize - off_y;
    552 
    553         boolean start_left = diff_left < diff_right;
    554         boolean start_top = diff_top < diff_bottom;
    555 
    556         if (start_top) {
    557             if (start_left) {
     545        int posx = w2 - offsx;
     546        int posy = h2 - offsy;
     547
     548        int diffLeft = offsx;
     549        int diffRight = tilesize - offsx;
     550        int diffTop = offsy;
     551        int diffBottom = tilesize - offsy;
     552
     553        boolean startLeft = diffLeft < diffRight;
     554        boolean startTop = diffTop < diffBottom;
     555
     556        if (startTop) {
     557            if (startLeft) {
    558558                iMove = 2;
    559559            } else {
     
    561561            }
    562562        } else {
    563             if (start_left) {
     563            if (startLeft) {
    564564                iMove = 1;
    565565            } else {
     
    567567            }
    568568        } // calculate the visibility borders
    569         int x_min = -tilesize;
    570         int y_min = -tilesize;
    571         int x_max = getWidth();
    572         int y_max = getHeight();
     569        int xMin = -tilesize;
     570        int yMin = -tilesize;
     571        int xMax = getWidth();
     572        int yMax = getHeight();
    573573
    574574        // calculate the length of the grid (number of squares per edge)
     
    585585                }
    586586                for (int j = 0; j < x; j++) {
    587                     if (x_min <= posx && posx <= x_max && y_min <= posy && posy <= y_max) {
     587                    if (xMin <= posx && posx <= xMax && yMin <= posy && posy <= yMax) {
    588588                        // tile is visible
    589589                        Tile tile;
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapMarkerCircle.java

    r31434 r31791  
    129129    @Override
    130130    public void paint(Graphics g, Point position, int radius) {
    131         int size_h = radius;
    132         int size = size_h * 2;
     131        int sizeH = radius;
     132        int size = sizeH * 2;
    133133
    134134        if (g instanceof Graphics2D && getBackColor() != null) {
     
    137137            g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER));
    138138            g2.setPaint(getBackColor());
    139             g.fillOval(position.x - size_h, position.y - size_h, size, size);
     139            g.fillOval(position.x - sizeH, position.y - sizeH, size, size);
    140140            g2.setComposite(oldComposite);
    141141        }
    142142        g.setColor(getColor());
    143         g.drawOval(position.x - size_h, position.y - size_h, size, size);
     143        g.drawOval(position.x - sizeH, position.y - sizeH, size, size);
    144144
    145145        if (getLayer() == null || getLayer().isVisibleTexts()) paintText(g, position);
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractMapQuestTileSource.java

    r31573 r31791  
    3131    private int SERVER_NUM = 1;
    3232
    33     public AbstractMapQuestTileSource(String name, String base_url, String id) {
    34         super(name, base_url, id);
     33    public AbstractMapQuestTileSource(String name, String baseUrl, String id) {
     34        super(name, baseUrl, id);
    3535    }
    3636
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractOsmTileSource.java

    r31434 r31791  
    2020     * Constructs a new OSM tile source
    2121     * @param name Source name as displayed in GUI
    22      * @param base_url Source URL
     22     * @param baseUrl Source URL
    2323     * @param id unique id for the tile source; contains only characters that
    2424     * are safe for file names; can be null
    2525     */
    26     public AbstractOsmTileSource(String name, String base_url, String id) {
    27         super(new TileSourceInfo(name, base_url, id));
     26    public AbstractOsmTileSource(String name, String baseUrl, String id) {
     27        super(new TileSourceInfo(name, baseUrl, id));
    2828    }
    2929
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java

    r31432 r31791  
    4343     *
    4444     * @param name name
    45      * @param base_url base URL
     45     * @param baseUrl base URL
    4646     * @param id unique id
    4747     */
    48     public TileSourceInfo(String name, String base_url, String id) {
     48    public TileSourceInfo(String name, String baseUrl, String id) {
    4949        this.name = name;
    50         this.url = base_url;
     50        this.url = baseUrl;
    5151        this.id = id;
    5252    }
Note: See TracChangeset for help on using the changeset viewer.