com.google.gwt.user.client.ui.impl
Class ClippedImagePrototype

java.lang.Object
  extended by com.google.gwt.user.client.ui.AbstractImagePrototype
      extended by com.google.gwt.user.client.ui.impl.ClippedImagePrototype

public class ClippedImagePrototype
extends AbstractImagePrototype

Implementation of AbstractImagePrototype for a clipped image. This class is used internally by the image bundle generator and is not intended for general use. It is subject to change without warning.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.AbstractImagePrototype
AbstractImagePrototype.ImagePrototypeElement
 
Constructor Summary
ClippedImagePrototype(java.lang.String url, int left, int top, int width, int height)
           
 
Method Summary
 void applyTo(AbstractImagePrototype.ImagePrototypeElement imageElement)
          Transforms an existing AbstractImagePrototype.ImagePrototypeElement into the image represented by this prototype.
 void applyTo(Image image)
          Transforms an existing Image into the image represented by this prototype.
 AbstractImagePrototype.ImagePrototypeElement createElement()
          Creates a new AbstractImagePrototype.ImagePrototypeElement based on the image represented by this prototype.
 Image createImage()
          Creates a new Image instance based on the image represented by this prototype.
 java.lang.String getHTML()
          Gets an HTML fragment that displays the image represented by this prototype.
 
Methods inherited from class com.google.gwt.user.client.ui.AbstractImagePrototype
create
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClippedImagePrototype

public ClippedImagePrototype(java.lang.String url,
                             int left,
                             int top,
                             int width,
                             int height)
Method Detail

applyTo

public void applyTo(Image image)
Description copied from class: AbstractImagePrototype
Transforms an existing Image into the image represented by this prototype.

Specified by:
applyTo in class AbstractImagePrototype
Parameters:
image - the instance to be transformed to match this prototype

applyTo

public void applyTo(AbstractImagePrototype.ImagePrototypeElement imageElement)
Description copied from class: AbstractImagePrototype
Transforms an existing AbstractImagePrototype.ImagePrototypeElement into the image represented by this prototype.

Overrides:
applyTo in class AbstractImagePrototype
Parameters:
imageElement - an ImagePrototypeElement created by AbstractImagePrototype.createElement()

createElement

public AbstractImagePrototype.ImagePrototypeElement createElement()
Description copied from class: AbstractImagePrototype
Creates a new AbstractImagePrototype.ImagePrototypeElement based on the image represented by this prototype. The DOM structure may not necessarily a simple <img> element. It may be a more complex structure that should be treated opaquely.

Overrides:
createElement in class AbstractImagePrototype
Returns:
the ImagePrototypeElement corresponding to the image represented by this prototype

createImage

public Image createImage()
Description copied from class: AbstractImagePrototype
Creates a new Image instance based on the image represented by this prototype.

Specified by:
createImage in class AbstractImagePrototype
Returns:
a new Image based on this prototype

getHTML

public java.lang.String getHTML()
Description copied from class: AbstractImagePrototype
Gets an HTML fragment that displays the image represented by this prototype. The HTML returned is not necessarily a simple <img> element. It may be a more complex structure that should be treated opaquely.

Specified by:
getHTML in class AbstractImagePrototype
Returns:
the HTML representation of this prototype