1 29 30 package nextapp.echo2.app; 31 32 35 public class HttpImageReference 36 implements ImageReference { 37 38 private String uri; 39 private Extent width, height; 40 private String id; 41 42 47 public HttpImageReference(String uri) { 48 this(uri, null, null); 49 } 50 51 60 public HttpImageReference(String uri, Extent width, Extent height) { 61 super(); 62 this.uri = uri; 63 this.width = width; 64 this.height = height; 65 id = ApplicationInstance.generateSystemId(); 66 } 67 68 71 public boolean equals(Object o) { 72 if (!(o instanceof HttpImageReference)) { 73 return false; 74 } 75 HttpImageReference that = (HttpImageReference) o; 76 if (!(this.uri == that.uri || (this.uri != null && this.uri.equals(that.uri)))) { 77 return false; 78 } 79 if (!(this.width == that.width || (this.width != null && this.width.equals(that.width)))) { 80 return false; 81 } 82 if (!(this.height == that.height || (this.height != null && this.height.equals(that.height)))) { 83 return false; 84 } 85 return true; 86 } 87 88 91 public Extent getHeight() { 92 return height; 93 } 94 95 98 public String getRenderId() { 99 return id; 100 } 101 102 107 public String getUri() { 108 return uri; 109 } 110 111 114 public Extent getWidth() { 115 return width; 116 } 117 } 118 | Popular Tags |