Changeset 8634 in josm


Ignore:
Timestamp:
2015-08-01T23:17:42+02:00 (9 years ago)
Author:
Don-vip
Message:

proper JOSM/JMapViewer integration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java

    r8568 r8634  
    374374     */
    375375    public ImageryInfo(ImageryPreferenceEntry e) {
     376        super(e.name, e.url, e.id);
    376377        CheckParameterUtil.ensureParameterNotNull(e.name, "name");
    377378        CheckParameterUtil.ensureParameterNotNull(e.url, "url");
    378         name = e.name;
    379         id = e.id;
    380         url = e.url;
    381379        description = e.description;
    382380        cookies = e.cookies;
     
    422420     */
    423421    public ImageryInfo(ImageryInfo i) {
    424         this.name = i.name;
    425         this.id = i.id;
    426         this.url = i.url;
     422        super(i.name, i.url, i.id);
    427423        this.defaultEntry = i.defaultEntry;
    428424        this.cookies = i.cookies;
     
    680676     * Returns the entry name.
    681677     * @return The entry name
    682      */
    683     @Override
    684     public String getName() {
    685         return this.name;
    686     }
    687 
    688     /**
    689      * Returns the entry name.
    690      * @return The entry name
    691678     * @since 6968
    692679     */
    693680    public String getOriginalName() {
    694681        return this.origName != null ? this.origName : this.name;
    695     }
    696 
    697     /**
    698      * Sets the entry name.
    699      * @param name The entry name
    700      */
    701     public void setName(String name) {
    702         this.name = name;
    703682    }
    704683
     
    720699    }
    721700
    722     /**
    723      * Gets the entry id.
    724      *
    725      * Id can be null. This gets the configured id as is. Due to a user error,
    726      * this may not be unique. Use {@link ImageryLayerInfo#getUniqueId} to ensure
    727      * a unique value.
    728      * @return the id
    729      */
    730     public String getId() {
    731         return this.id;
    732     }
    733 
    734     /**
    735      * Sets the entry id.
    736      * @param id the entry id
    737      */
    738     public void setId(String id) {
    739         this.id = id;
    740     }
    741 
    742701    public void clearId() {
    743702        if (this.id != null) {
     
    746705            Main.pref.putCollection("imagery.layers.addedIds", newAddedIds);
    747706        }
    748         this.id = null;
    749     }
    750 
    751     /**
    752      * Returns the entry URL.
    753      * @return The entry URL
    754      */
    755     @Override
    756     public String getUrl() {
    757         return this.url;
    758     }
    759 
    760     /**
    761      * Sets the entry URL.
    762      * @param url The entry URL
    763      */
    764     public void setUrl(String url) {
    765         this.url = url;
     707        setId(null);
    766708    }
    767709
Note: See TracChangeset for help on using the changeset viewer.