public class AwtImageReference extends java.lang.Object implements ImageReference
java.awt.Image. Note that the JVM running the
Echo Application Container will require access to a graphics context for the Java AWT to function.
WARNING: Use of this class is STRONGLY DISCOURAGED unless you specifically need to dynamically render or modify image content. Rendering AWT images requires that the image be brought into memory as a bitmap and then rendered to a client-compatible format (e.g., PNG). DO NOT use this class unless you absolutely must.
The preferred means of serving images is by using ResourceImageReferences or HttpImageReferences.
| Constructor and Description |
|---|
AwtImageReference()
Default constructor for use only when a class is derived from
AwtImageReference and the
getImage() method is overridden. |
AwtImageReference(java.awt.Image image)
Creates an
AwtImageReference to the specified
java.awt.Image. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
Extent |
getHeight()
Returns the height of the image, or null if the size is unknown.
|
java.awt.Image |
getImage()
Retrieves the image.
|
java.lang.String |
getRenderId()
Returns an identifier that is unique within the
ApplicationInstance with which the implementor will be
used. |
Extent |
getWidth()
Returns the width of the image, or null if the size is unknown.
|
public AwtImageReference()
AwtImageReference and the
getImage() method is overridden.public AwtImageReference(java.awt.Image image)
AwtImageReference to the specified
java.awt.Image.
Note that changes to the underlying image will not necessarily be
reflected on the client unless the image-containing property of the
target component is update.image - the java.awt.Image to be displayed.public boolean equals(java.lang.Object o)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public Extent getHeight()
ImageReferencegetHeight in interface ImageReferenceImageReference.getHeight()public java.lang.String getRenderId()
RenderIdSupportApplicationInstance with which the implementor will be
used.getRenderId in interface RenderIdSupportRenderIdSupport.getRenderId()public java.awt.Image getImage()
getWidth() and
getHeight() methods.public Extent getWidth()
ImageReferencegetWidth in interface ImageReferenceImageReference.getWidth()