Changeset 4714 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2011-12-26T22:20:52+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageRequest.java
r4712 r4714 17 17 * or in funky double-brace style 18 18 * 19 * ImageIcon icon = new Image Provider.Request(){{name=imgName; width=100; height=120;}}.get();19 * ImageIcon icon = new ImageRequest(){{name=imgName; width=100; height=120;}}.get(); 20 20 */ 21 21 public class ImageRequest { … … 30 30 protected int maxHeight = -1; 31 31 protected boolean sanitize; 32 protected boolean required = true;32 protected boolean optional; 33 33 34 34 public ImageRequest setDirs(Collection<String> dirs) { … … 82 82 } 83 83 84 public ImageRequest set Required(boolean required) {85 this. required = required;84 public ImageRequest setOptional(boolean optional) { 85 this.optional = optional; 86 86 return this; 87 87 } … … 90 90 ImageResource ir = ImageProvider.getIfAvailableImpl(dirs, id, subdir, name, archive); 91 91 if (ir == null) { 92 if ( required) {92 if (!optional) { 93 93 String ext = name.indexOf('.') != -1 ? "" : ".???"; 94 94 throw new RuntimeException(tr("Fatal: failed to locate image ''{0}''. This is a serious configuration problem. JOSM will stop working.", name + ext));
Note:
See TracChangeset
for help on using the changeset viewer.