public class

ImageElement

extends Element
java.lang.Object
   ↳ com.google.gwt.core.client.JavaScriptObject
     ↳ com.google.gwt.dom.client.Node
       ↳ com.google.gwt.dom.client.Element
         ↳ com.google.gwt.dom.client.ImageElement

Class Overview

Embedded image.

Summary

[Expand]
Inherited Constants
From class com.google.gwt.dom.client.Node
Protected Constructors
ImageElement()
Public Methods
static ImageElement as(Element elem)
Assert that the given Element is compatible with this class and automatically typecast it.
final String getAlt()
Alternate text for user agents not rendering the normal content of this element.
final int getHeight()
Height of the image in pixels.
final String getSrc()
URI designating the source of this image.
final int getWidth()
The width of the image in pixels.
final boolean isMap()
Use server-side image map.
final void setAlt(String alt)
Alternate text for user agents not rendering the normal content of this element.
final void setHeight(int height)
Height of the image in pixels.
final void setIsMap(boolean isMap)
Use server-side image map.
final void setSrc(String src)

URI designating the source of this image.

final void setUseMap(boolean useMap)
Use client-side image map.
final void setWidth(int width)
The width of the image in pixels.
final boolean useMap()
Use client-side image map.
[Expand]
Inherited Methods
From class com.google.gwt.dom.client.Element
From class com.google.gwt.dom.client.Node
From class com.google.gwt.core.client.JavaScriptObject
From class java.lang.Object

Protected Constructors

protected ImageElement ()

Public Methods

public static ImageElement as (Element elem)

Assert that the given Element is compatible with this class and automatically typecast it.

public final String getAlt ()

Alternate text for user agents not rendering the normal content of this element.

public final int getHeight ()

Height of the image in pixels.

public final String getSrc ()

URI designating the source of this image.

public final int getWidth ()

The width of the image in pixels.

public final boolean isMap ()

Use server-side image map.

public final void setAlt (String alt)

Alternate text for user agents not rendering the normal content of this element.

public final void setHeight (int height)

Height of the image in pixels.

public final void setIsMap (boolean isMap)

Use server-side image map.

public final void setSrc (String src)

URI designating the source of this image.

If you cloneNode(boolean) an ImageElement, or an element that contains an ImageElement, then you must call setSrc(String) on the cloned element to ensure it is loaded properly in IE6. Failure to do so may cause performance problems, or your image may not load due to an IE6 specific workaround.

public final void setUseMap (boolean useMap)

Use client-side image map.

public final void setWidth (int width)

The width of the image in pixels.

public final boolean useMap ()

Use client-side image map.