Ignore:
Timestamp:
2015-12-27T16:37:14+01:00 (8 years ago)
Author:
Don-vip
Message:

fix various warnings (checkstyle, sonar, javadoc)

File:
1 edited

Legend:

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

    r9176 r9180  
    170170     * @throws IllegalArgumentException when Imagery is not supported by layer
    171171     */
    172     protected abstract AbstractTMSTileSource getTileSource(ImageryInfo info) throws IllegalArgumentException;
     172    protected abstract AbstractTMSTileSource getTileSource(ImageryInfo info);
    173173
    174174    protected Map<String, String> getHeaders(TileSource tileSource) {
     
    266266    /**
    267267     * Returns average number of screen pixels per tile pixel for current mapview
     268     * @param zoom zoom level
     269     * @return average number of screen pixels per tile pixel
    268270     */
    269271    private double getScaleFactor(int zoom) {
     
    874876    }
    875877
    876     /*
    877      * This can and will return null for tiles that are not
    878      * already in the cache.
     878    /**
     879     * Returns tile at given position.
     880     * This can and will return null for tiles that are not already in the cache.
     881     * @param x tile number on the x axis of the tile to be retrieved
     882     * @param y tile number on the y axis of the tile to be retrieved
     883     * @param zoom zoom level of the tile to be retrieved
     884     * @return tile at given position
    879885     */
    880886    private Tile getTile(int x, int y, int zoom) {
    881         if (x < tileSource.getTileXMin(zoom) || x > tileSource.getTileXMax(zoom) || y < tileSource.getTileYMin(zoom) || y > tileSource.getTileYMax(zoom))
     887        if (x < tileSource.getTileXMin(zoom) || x > tileSource.getTileXMax(zoom)
     888         || y < tileSource.getTileYMin(zoom) || y > tileSource.getTileYMax(zoom))
    882889            return null;
    883890        return tileCache.getTile(tileSource, x, y, zoom);
     
    11661173        /**
    11671174         * Create a TileSet by EastNorth bbox taking a layer shift in account
     1175         * @param topLeft top-left lat/lon
     1176         * @param botRight bottom-right lat/lon
     1177         * @param zoom zoom level
    11681178         */
    11691179        private TileSet(EastNorth topLeft, EastNorth botRight, int zoom) {
     
    11731183        /**
    11741184         * Create a TileSet by known LatLon bbox without layer shift correction
     1185         * @param topLeft top-left lat/lon
     1186         * @param botRight bottom-right lat/lon
     1187         * @param zoom zoom level
    11751188         */
    11761189        private TileSet(LatLon topLeft, LatLon botRight, int zoom) {
     
    15431556
    15441557    /**
    1545      * This isn't very efficient, but it is only used when the
    1546      * user right-clicks on the map.
     1558     * Returns tile for a pixel position.<p>
     1559     * This isn't very efficient, but it is only used when the user right-clicks on the map.
     1560     * @param px pixel X coordinate
     1561     * @param py pixel Y coordinate
     1562     * @return Tile at pixel position
    15471563     */
    15481564    private Tile getTileForPixelpos(int px, int py) {
     
    15761592        if (clickedTile == null)
    15771593            return null;
    1578         /*Main.debug("Clicked on tile: " + clickedTile.getXtile() + " " + clickedTile.getYtile() +
    1579                 " currentZoomLevel: " + currentZoomLevel);*/
     1594        if (Main.isTraceEnabled()) {
     1595            Main.trace("Clicked on tile: " + clickedTile.getXtile() + " " + clickedTile.getYtile() +
     1596                " currentZoomLevel: " + currentZoomLevel);
     1597        }
    15801598        return clickedTile;
    15811599    }
Note: See TracChangeset for help on using the changeset viewer.