Changeset 5369 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2012-07-26T19:54:44+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/imagery
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r4881 r5369 98 98 private String countryCode = ""; 99 99 private String icon; 100 // when adding a field, also adapt the ImageryInfo(ImageryInfo) constructor 100 101 101 102 /** auxiliary class to save an ImageryInfo object in the preferences */ … … 246 247 247 248 public ImageryInfo(ImageryInfo i) { 248 this.name=i.name; 249 this.url=i.url; 250 this.cookies=i.cookies; 251 this.imageryType=i.imageryType; 252 this.defaultMinZoom=i.defaultMinZoom; 253 this.defaultMaxZoom=i.defaultMaxZoom; 254 this.pixelPerDegree=i.pixelPerDegree; 249 this.name = i.name; 250 this.url = i.url; 251 this.defaultEntry = i.defaultEntry; 252 this.cookies = i.cookies; 255 253 this.eulaAcceptanceRequired = null; 254 this.imageryType = i.imageryType; 255 this.pixelPerDegree = i.pixelPerDegree; 256 this.defaultMaxZoom = i.defaultMaxZoom; 257 this.defaultMinZoom = i.defaultMinZoom; 256 258 this.bounds = i.bounds; 259 this.serverProjections = i.serverProjections; 257 260 this.attributionText = i.attributionText; 258 261 this.attributionLinkURL = i.attributionLinkURL; … … 261 264 this.termsOfUseText = i.termsOfUseText; 262 265 this.termsOfUseURL = i.termsOfUseURL; 263 this. serverProjections = i.serverProjections;266 this.countryCode = i.countryCode; 264 267 this.icon = i.icon; 268 } 269 270 @Override 271 public boolean equals(Object o) { 272 if (this == o) return true; 273 if (o == null || getClass() != o.getClass()) return false; 274 275 ImageryInfo that = (ImageryInfo) o; 276 277 if (imageryType != that.imageryType) return false; 278 if (url != null ? !url.equals(that.url) : that.url != null) return false; 279 280 return true; 281 } 282 283 @Override 284 public int hashCode() { 285 int result = url != null ? url.hashCode() : 0; 286 result = 31 * result + (imageryType != null ? imageryType.hashCode() : 0); 287 return result; 288 } 289 290 @Override 291 public String toString() { 292 return "ImageryInfo{" + 293 "name='" + name + '\'' + 294 ", countryCode='" + countryCode + '\'' + 295 ", url='" + url + '\'' + 296 ", imageryType=" + imageryType + 297 '}'; 265 298 } 266 299 -
trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
r4881 r5369 150 150 Main.main.menu.imageryMenu.refreshImageryMenu(); 151 151 } 152 153 public static void addLayers(Collection<ImageryInfo> infos) { 154 for (ImageryInfo i : infos) { 155 instance.add(i); 156 } 157 instance.save(); 158 Collections.sort(instance.layers); 159 Main.main.menu.imageryMenu.refreshImageryMenu(); 160 } 152 161 }
Note:
See TracChangeset
for help on using the changeset viewer.