diff --git a/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java b/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
index 6fee128..93322e9 100644
|
a
|
b
|
public class ImageryInfo implements Comparable<ImageryInfo> {
|
| 57 | 57 | private String attributionImage; |
| 58 | 58 | private String attributionLinkURL; |
| 59 | 59 | private String termsOfUseURL; |
| | 60 | private String countryCode = ""; |
| 60 | 61 | |
| 61 | 62 | public ImageryInfo() { |
| 62 | 63 | } |
| … |
… |
public class ImageryInfo implements Comparable<ImageryInfo> {
|
| 165 | 166 | @Override |
| 166 | 167 | public int compareTo(ImageryInfo in) |
| 167 | 168 | { |
| 168 | | int i = name.compareTo(in.name); |
| 169 | | if(i == 0) { |
| | 169 | int i = countryCode.compareTo(in.countryCode); |
| | 170 | if (i == 0) { |
| | 171 | i = name.compareTo(in.name); |
| | 172 | } |
| | 173 | if (i == 0) { |
| 170 | 174 | i = url.compareTo(in.url); |
| 171 | 175 | } |
| 172 | | if(i == 0) { |
| | 176 | if (i == 0) { |
| 173 | 177 | i = Double.compare(pixelPerDegree, in.pixelPerDegree); |
| 174 | 178 | } |
| 175 | 179 | return i; |
| … |
… |
public class ImageryInfo implements Comparable<ImageryInfo> {
|
| 294 | 298 | this.eulaAcceptanceRequired = eulaAcceptanceRequired; |
| 295 | 299 | } |
| 296 | 300 | |
| | 301 | public String getCountryCode() { |
| | 302 | return countryCode; |
| | 303 | } |
| | 304 | |
| | 305 | public void setCountryCode(String countryCode) { |
| | 306 | this.countryCode = countryCode; |
| | 307 | } |
| | 308 | |
| 297 | 309 | /** |
| 298 | 310 | * Get the projections supported by the server. Only relevant for |
| 299 | 311 | * WMS-type ImageryInfo at the moment. |
diff --git a/src/org/openstreetmap/josm/gui/preferences/ImageryPreference.java b/src/org/openstreetmap/josm/gui/preferences/ImageryPreference.java
index 5bf23c1..1e22e3d 100644
|
a
|
b
|
public class ImageryPreference implements PreferenceSetting {
|
| 389 | 389 | }; |
| 390 | 390 | |
| 391 | 391 | TableColumnModel mod = listdef.getColumnModel(); |
| 392 | | mod.getColumn(1).setPreferredWidth(800); |
| 393 | | mod.getColumn(0).setPreferredWidth(200); |
| | 392 | mod.getColumn(2).setPreferredWidth(800); |
| | 393 | mod.getColumn(1).setPreferredWidth(400); |
| | 394 | mod.getColumn(0).setPreferredWidth(50); |
| 394 | 395 | mod = listActive.getColumnModel(); |
| 395 | 396 | mod.getColumn(2).setPreferredWidth(50); |
| 396 | 397 | mod.getColumn(1).setPreferredWidth(800); |
| … |
… |
public class ImageryPreference implements PreferenceSetting {
|
| 640 | 641 | */ |
| 641 | 642 | class ImageryDefaultLayerTableModel extends DefaultTableModel { |
| 642 | 643 | public ImageryDefaultLayerTableModel() { |
| 643 | | setColumnIdentifiers(new String[] { tr("Menu Name (Default)"), tr("Imagery URL (Default)") }); |
| | 644 | setColumnIdentifiers(new String[]{"", tr("Menu Name (Default)"), tr("Imagery URL (Default)")}); |
| 644 | 645 | } |
| 645 | 646 | |
| 646 | 647 | public ImageryInfo getRow(int row) { |
| … |
… |
public class ImageryPreference implements PreferenceSetting {
|
| 657 | 658 | ImageryInfo info = layerInfo.getDefaultLayers().get(row); |
| 658 | 659 | switch (column) { |
| 659 | 660 | case 0: |
| 660 | | return info.getName(); |
| | 661 | return info.getCountryCode(); |
| 661 | 662 | case 1: |
| | 663 | return info.getName(); |
| | 664 | case 2: |
| 662 | 665 | return info.getExtendedUrl(); |
| 663 | 666 | } |
| 664 | 667 | return null; |
diff --git a/src/org/openstreetmap/josm/io/imagery/ImageryReader.java b/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
index a3d724b..31c85ab 100644
|
a
|
b
|
public class ImageryReader {
|
| 235 | 235 | "logo-url", |
| 236 | 236 | "terms-of-use-text", |
| 237 | 237 | "terms-of-use-url", |
| | 238 | "country-code", |
| 238 | 239 | }).contains(qName)) { |
| 239 | 240 | newState = State.ENTRY_ATTRIBUTE; |
| 240 | 241 | } else if (qName.equals("bounds")) { |
| … |
… |
public class ImageryReader {
|
| 352 | 353 | // TODO: it should be possible to configure the terms of use display text |
| 353 | 354 | } else if (qName.equals("terms-of-use-url")) { |
| 354 | 355 | entry.setTermsOfUseURL(accumulator.toString()); |
| | 356 | } else if (qName.equals("country-code")) { |
| | 357 | entry.setCountryCode(accumulator.toString()); |
| | 358 | } else { |
| 355 | 359 | } |
| 356 | 360 | break; |
| 357 | 361 | case PR: |