Changeset 33219 in osm


Ignore:
Timestamp:
2017-04-09T11:05:07+02:00 (8 years ago)
Author:
bastik
Message:

[jmapviewer] see #josm7427 - remove 'final' + extend toString()

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

Legend:

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

    r33211 r33219  
    7676        this.ytile = ytile;
    7777        this.zoom = zoom;
    78         this.setImage(image);
     78        this.image = image;
    7979        this.key = getTileKey(source, xtile, ytile, zoom);
    8080    }
     
    240240    }
    241241
    242     public final void setImage(BufferedImage image) {
     242    public void setImage(BufferedImage image) {
    243243        this.image = image;
    244244    }
     
    303303    @Override
    304304    public String toString() {
    305         return "Tile " + key;
     305        StringBuilder sb = new StringBuilder("Tile ").append(key);
     306        if (loading) {
     307            sb.append(" [LOADING...]");
     308        }
     309        if (loaded) {
     310            sb.append(" [loaded]");
     311        }
     312        if (error) {
     313            sb.append(" [ERROR]");
     314        }
     315        return sb.toString();
    306316    }
    307317
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/TileXY.java

    r32664 r33219  
    5555        return y;
    5656    }
     57
     58    @Override
     59    public String toString() {
     60        return "TileXY{" + x + ", " + y + "}";
     61    }
    5762}
Note: See TracChangeset for help on using the changeset viewer.