Ignore:
Timestamp:
2016-10-26T14:02:07+02:00 (7 years ago)
Author:
simon04
Message:

AbstractTileSourceLayer#getTileSource: drop method parameter, use field instead

Location:
trunk/src/org/openstreetmap/josm/gui/layer
Files:
4 edited

Legend:

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

    r11125 r11167  
    216216
    217217    /**
     218     * Creates and returns a new {@link TileSource} instance depending on {@link #info} specified in the constructor.
    218219     *
    219      * @param info imagery info
    220220     * @return TileSource for specified ImageryInfo
    221221     * @throws IllegalArgumentException when Imagery is not supported by layer
    222222     */
    223     protected abstract T getTileSource(ImageryInfo info);
     223    protected abstract T getTileSource();
    224224
    225225    protected Map<String, String> getHeaders(T tileSource) {
     
    679679    private void initializeIfRequired() {
    680680        if (tileSource == null) {
    681             tileSource = getTileSource(info);
     681            tileSource = getTileSource();
    682682            if (tileSource == null) {
    683683                throw new IllegalArgumentException(tr("Failed to create tile source"));
  • trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java

    r10634 r11167  
    6060    /**
    6161     * Creates and returns a new TileSource instance depending on the {@link ImageryType}
    62      * of the passed ImageryInfo object.
     62     * of the {@link ImageryInfo} object specified in the constructor.
    6363     *
    6464     * If no appropriate TileSource is found, null is returned.
     
    6767     *
    6868     *
    69      * @param info imagery info
    7069     * @return a new TileSource instance or null if no TileSource for the ImageryInfo/ImageryType could be found.
    7170     * @throws IllegalArgumentException if url from imagery info is null or invalid
    7271     */
    7372    @Override
    74     protected TMSTileSource getTileSource(ImageryInfo info) {
     73    protected TMSTileSource getTileSource() {
    7574        return getTileSourceStatic(info, () -> {
    7675            Main.debug("Attribution loaded, running loadAllErrorTiles");
  • trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java

    r11017 r11167  
    8181
    8282    @Override
    83     protected AbstractWMSTileSource getTileSource(ImageryInfo info) {
     83    protected AbstractWMSTileSource getTileSource() {
    8484        if (info.getImageryType() == ImageryType.WMS && info.getUrl() != null) {
    8585            TemplatedWMSTileSource.checkUrl(info.getUrl());
  • trunk/src/org/openstreetmap/josm/gui/layer/WMTSLayer.java

    r10568 r11167  
    5252
    5353    @Override
    54     protected WMTSTileSource getTileSource(ImageryInfo info) {
     54    protected WMTSTileSource getTileSource() {
    5555        try {
    5656            if (info.getImageryType() == ImageryType.WMTS && info.getUrl() != null) {
Note: See TracChangeset for help on using the changeset viewer.