/** * Creates an image with a specified URL. The load event will be fired once * the image at the given URL has been retrieved by the browser. * * @param url the URL of the image to be displayed */ public Image(String url) { this(UriUtils.unsafeCastFromUntrustedString(url)); }
/** * Creates a clipped image with a specified URL and visibility rectangle. The * visibility rectangle is declared relative to the rectangle which * encompasses the entire image, which has an upper-left vertex of (0,0). The * load event will be fired immediately after the object has been constructed * (i.e. potentially before the image has been loaded in the browser). Since * the width and height are specified explicitly by the user, this behavior * will not cause problems with retrieving the width and height of a clipped * image in a load event handler. * * @param url the URL of the image to be displayed * @param left the horizontal co-ordinate of the upper-left vertex of the * visibility rectangle * @param top the vertical co-ordinate of the upper-left vertex of the * visibility rectangle * @param width the width of the visibility rectangle * @param height the height of the visibility rectangle */ public Image(String url, int left, int top, int width, int height) { this(UriUtils.unsafeCastFromUntrustedString(url), left, top, width, height); }
@Deprecated public ClippedImagePrototype(String url, int left, int top, int width, int height) { this(UriUtils.unsafeCastFromUntrustedString(url), left, top, width, height); }
/** * Sets the URL of the image to be displayed. If the image is in the clipped * state, a call to this method will cause a transition of the image to the * unclipped state. Regardless of whether or not the image is in the clipped * or unclipped state, a load event will be fired. * * @param url the image URL */ public void setUrl(String url) { setUrl(UriUtils.unsafeCastFromUntrustedString(url)); }
/** * Sets the url and the visibility rectangle for the image at the same time. A * single load event will be fired if either the incoming url or visiblity * rectangle co-ordinates differ from the image's current url or current * visibility rectangle co-ordinates. If the image is currently in the * unclipped state, a call to this method will cause a transition to the * clipped state. * * @param url the image URL * @param left the horizontal coordinate of the upper-left vertex of the * visibility rectangle * @param top the vertical coordinate of the upper-left vertex of the * visibility rectangle * @param width the width of the visibility rectangle * @param height the height of the visibility rectangle */ public void setUrlAndVisibleRect(String url, int left, int top, int width, int height) { setUrlAndVisibleRect(UriUtils.unsafeCastFromUntrustedString(url), left, top, width, height); }
@Override public SafeUri getUrl(Image image) { return UriUtils.unsafeCastFromUntrustedString(getImageElement(image).getSrc()); }
/** * Creates an image with a specified URL. The load event will be fired once * the image at the given URL has been retrieved by the browser. * * @param url the URL of the image to be displayed */ public Image(String url) { this(UriUtils.unsafeCastFromUntrustedString(url)); }
/** * Creates an image with a specified URL. The load event will be fired once * the image at the given URL has been retrieved by the browser. * * @param url the URL of the image to be displayed */ public Image(String url) { this(UriUtils.unsafeCastFromUntrustedString(url)); }
/** * Creates a clipped image with a specified URL and visibility rectangle. The * visibility rectangle is declared relative to the rectangle which * encompasses the entire image, which has an upper-left vertex of (0,0). The * load event will be fired immediately after the object has been constructed * (i.e. potentially before the image has been loaded in the browser). Since * the width and height are specified explicitly by the user, this behavior * will not cause problems with retrieving the width and height of a clipped * image in a load event handler. * * @param url the URL of the image to be displayed * @param left the horizontal co-ordinate of the upper-left vertex of the * visibility rectangle * @param top the vertical co-ordinate of the upper-left vertex of the * visibility rectangle * @param width the width of the visibility rectangle * @param height the height of the visibility rectangle */ public Image(String url, int left, int top, int width, int height) { this(UriUtils.unsafeCastFromUntrustedString(url), left, top, width, height); }
/** * Creates a clipped image with a specified URL and visibility rectangle. The * visibility rectangle is declared relative to the rectangle which * encompasses the entire image, which has an upper-left vertex of (0,0). The * load event will be fired immediately after the object has been constructed * (i.e. potentially before the image has been loaded in the browser). Since * the width and height are specified explicitly by the user, this behavior * will not cause problems with retrieving the width and height of a clipped * image in a load event handler. * * @param url the URL of the image to be displayed * @param left the horizontal co-ordinate of the upper-left vertex of the * visibility rectangle * @param top the vertical co-ordinate of the upper-left vertex of the * visibility rectangle * @param width the width of the visibility rectangle * @param height the height of the visibility rectangle */ public Image(String url, int left, int top, int width, int height) { this(UriUtils.unsafeCastFromUntrustedString(url), left, top, width, height); }
@Deprecated public ClippedImagePrototype(String url, int left, int top, int width, int height) { this(UriUtils.unsafeCastFromUntrustedString(url), left, top, width, height); }
@Deprecated public ClippedImagePrototype(String url, int left, int top, int width, int height) { this(UriUtils.unsafeCastFromUntrustedString(url), left, top, width, height); }
/** * Sets the URL of the image to be displayed. If the image is in the clipped * state, a call to this method will cause a transition of the image to the * unclipped state. Regardless of whether or not the image is in the clipped * or unclipped state, a load event will be fired. * * @param url the image URL */ public void setUrl(String url) { setUrl(UriUtils.unsafeCastFromUntrustedString(url)); }
/** * Sets the URL of the image to be displayed. If the image is in the clipped * state, a call to this method will cause a transition of the image to the * unclipped state. Regardless of whether or not the image is in the clipped * or unclipped state, a load event will be fired. * * @param url the image URL */ public void setUrl(String url) { setUrl(UriUtils.unsafeCastFromUntrustedString(url)); }
/** * Sets the url and the visibility rectangle for the image at the same time. A * single load event will be fired if either the incoming url or visiblity * rectangle co-ordinates differ from the image's current url or current * visibility rectangle co-ordinates. If the image is currently in the * unclipped state, a call to this method will cause a transition to the * clipped state. * * @param url the image URL * @param left the horizontal coordinate of the upper-left vertex of the * visibility rectangle * @param top the vertical coordinate of the upper-left vertex of the * visibility rectangle * @param width the width of the visibility rectangle * @param height the height of the visibility rectangle */ public void setUrlAndVisibleRect(String url, int left, int top, int width, int height) { setUrlAndVisibleRect(UriUtils.unsafeCastFromUntrustedString(url), left, top, width, height); }
/** * Sets the url and the visibility rectangle for the image at the same time. A * single load event will be fired if either the incoming url or visiblity * rectangle co-ordinates differ from the image's current url or current * visibility rectangle co-ordinates. If the image is currently in the * unclipped state, a call to this method will cause a transition to the * clipped state. * * @param url the image URL * @param left the horizontal coordinate of the upper-left vertex of the * visibility rectangle * @param top the vertical coordinate of the upper-left vertex of the * visibility rectangle * @param width the width of the visibility rectangle * @param height the height of the visibility rectangle */ public void setUrlAndVisibleRect(String url, int left, int top, int width, int height) { setUrlAndVisibleRect(UriUtils.unsafeCastFromUntrustedString(url), left, top, width, height); }
@Override public SafeUri getUrl(Image image) { return UriUtils.unsafeCastFromUntrustedString(getImageElement(image).getSrc()); }
@Override public SafeUri getUrl(Image image) { return UriUtils.unsafeCastFromUntrustedString(getImageElement(image).getSrc()); }