Changeset 7748 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2014-11-25T23:51:45+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r7731 r7748 91 91 public class ImageProvider { 92 92 93 private static final String HTTP_PROTOCOL = "http://"; 94 private static final String HTTPS_PROTOCOL = "https://"; 95 private static final String WIKI_PROTOCOL = "wiki://"; 96 93 97 /** 94 98 * Position of an overlay icon … … 266 270 * @since 7687 267 271 */ 268 static public Dimension getImageSizes(ImageSizes size) {272 public static Dimension getImageSizes(ImageSizes size) { 269 273 int sizeval; 270 274 switch(size) { … … 458 462 */ 459 463 public void getInBackground(final ImageCallback callback) { 460 if (name.startsWith( "http://") || name.startsWith("wiki://")) {464 if (name.startsWith(HTTP_PROTOCOL) || name.startsWith(WIKI_PROTOCOL)) { 461 465 Runnable fetch = new Runnable() { 462 466 @Override … … 486 490 */ 487 491 public void getInBackground(final ImageResourceCallback callback) { 488 if (name.startsWith( "http://") || name.startsWith("wiki://")) {492 if (name.startsWith(HTTP_PROTOCOL) || name.startsWith(WIKI_PROTOCOL)) { 489 493 Runnable fetch = new Runnable() { 490 494 @Override … … 572 576 ImageType type = name.toLowerCase().endsWith(".svg") ? ImageType.SVG : ImageType.OTHER; 573 577 574 if (name.startsWith( "http://") || name.startsWith("https://")) {578 if (name.startsWith(HTTP_PROTOCOL) || name.startsWith(HTTPS_PROTOCOL)) { 575 579 String url = name; 576 580 ImageResource ir = cache.get(url); … … 581 585 } 582 586 return ir; 583 } else if (name.startsWith( "wiki://")) {587 } else if (name.startsWith(WIKI_PROTOCOL)) { 584 588 ImageResource ir = cache.get(name); 585 589 if (ir != null) return ir; … … 984 988 * overlay must be transparent in the background. 985 989 * Also scaling is not cared about with current implementation. 990 * @deprecated this method will be refactored 986 991 */ 987 992 @Deprecated
Note:
See TracChangeset
for help on using the changeset viewer.