com.maryanovsky.gwtutils.client
Class UrlImagePrototype

java.lang.Object
  extended by com.google.gwt.user.client.ui.AbstractImagePrototype
      extended by com.maryanovsky.gwtutils.client.UrlImagePrototype

public class UrlImagePrototype
extends AbstractImagePrototype

An image prototype which returns images from a certain URL.

Author:
Maryanovsky Alexander

Constructor Summary
UrlImagePrototype(String url)
          Creates a new UrlImagePrototype with the specified image URL.
UrlImagePrototype(String url, Size size)
          Creates a new UrlImagePrototype with the specified URL and an optional size.
UrlImagePrototype(String url, Size imageSize, boolean isPng)
          Creates a new UrlImagePrototype with the specified URL, an optional size and a flag specifying whether the image is a PNG image.
 
Method Summary
 void applyTo(Image image)
          
 Image createImage()
          
 String getHTML()
          
 String getUrl()
          Returns the image's URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlImagePrototype

public UrlImagePrototype(String url)
Creates a new UrlImagePrototype with the specified image URL.


UrlImagePrototype

public UrlImagePrototype(String url,
                         Size size)
Creates a new UrlImagePrototype with the specified URL and an optional size.


UrlImagePrototype

public UrlImagePrototype(String url,
                         Size imageSize,
                         boolean isPng)
Creates a new UrlImagePrototype with the specified URL, an optional size and a flag specifying whether the image is a PNG image. PNG images will have the PNG hack applied to them under IE versions which don't support PNG transparency. If you are using a PNG image on such a browser it is advised to also pass the image's size.

Parameters:
url - The URL of the image.
imageSize - The size of the image; may be null for the image's inherent size.
isPng - Whether the image is to be treated as a PNG image for the purpose of the IE PNG hack.
Method Detail

getUrl

public String getUrl()
Returns the image's URL.


applyTo

public void applyTo(Image image)

Specified by:
applyTo in class AbstractImagePrototype

createImage

public Image createImage()

Specified by:
createImage in class AbstractImagePrototype

getHTML

public String getHTML()

Specified by:
getHTML in class AbstractImagePrototype