public class

ClippedImagePrototype

extends AbstractImagePrototype
java.lang.Object
   ↳ com.google.gwt.user.client.ui.AbstractImagePrototype
     ↳ com.google.gwt.user.client.ui.impl.ClippedImagePrototype

Class Overview

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.

Summary

Public Constructors
ClippedImagePrototype(String url, int left, int top, int width, int height)
Public Methods
void applyTo(Image image)
Transforms an existing Image into the image represented by this prototype.
void applyTo(AbstractImagePrototype.ImagePrototypeElement imageElement)
Transforms an existing AbstractImagePrototype.ImagePrototypeElement 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.
String getHTML()
Gets an HTML fragment that displays the image represented by this prototype.
[Expand]
Inherited Methods
From class com.google.gwt.user.client.ui.AbstractImagePrototype
From class java.lang.Object

Public Constructors

public ClippedImagePrototype (String url, int left, int top, int width, int height)

Public Methods

public void applyTo (Image image)

Transforms an existing Image into the image represented by this prototype.

Parameters
image the instance to be transformed to match this prototype

public void applyTo (AbstractImagePrototype.ImagePrototypeElement imageElement)

Transforms an existing AbstractImagePrototype.ImagePrototypeElement into the image represented by this prototype.

Parameters
imageElement an ImagePrototypeElement created by createElement()

public AbstractImagePrototype.ImagePrototypeElement createElement ()

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.

Returns
  • the ImagePrototypeElement corresponding to the image represented by this prototype

public Image createImage ()

Creates a new Image instance based on the image represented by this prototype.

Returns
  • a new Image based on this prototype

public String getHTML ()

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.

Returns
  • the HTML representation of this prototype