NextApp Echo3
v3.0.b4

nextapp.echo.app
Class AwtImageReference

java.lang.Object
  extended by nextapp.echo.app.AwtImageReference
All Implemented Interfaces:
java.io.Serializable, ImageReference, RenderIdSupport

public class AwtImageReference
extends java.lang.Object
implements ImageReference

An ImageReference describing an image which may be rendered from a 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.

See Also:
Serialized Form

Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AwtImageReference

public AwtImageReference()
Default constructor for use only when a class is derived from AwtImageReference and the getImage() method is overridden.


AwtImageReference

public AwtImageReference(java.awt.Image image)
Creates an 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.

Parameters:
image - the java.awt.Image to be displayed.
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getHeight

public Extent getHeight()
Description copied from interface: ImageReference
Returns the height of the image, or null if the size is unknown.

Specified by:
getHeight in interface ImageReference
Returns:
the height of the image
See Also:
ImageReference.getHeight()

getRenderId

public java.lang.String getRenderId()
Description copied from interface: RenderIdSupport
Returns an identifier that is unique within the ApplicationInstance with which the implementor will be used.

Specified by:
getRenderId in interface RenderIdSupport
See Also:
RenderIdSupport.getRenderId()

getImage

public java.awt.Image getImage()
Retrieves the image. Calls to this method will be minimized such that applications may extend this class and override this method such that images are created only when they are needed, thereby reducing memory usage at the cost of increased processor workload. You should also override the getWidth() and getHeight() methods.


getWidth

public Extent getWidth()
Description copied from interface: ImageReference
Returns the width of the image, or null if the size is unknown.

Specified by:
getWidth in interface ImageReference
Returns:
the width of the image
See Also:
ImageReference.getWidth()

NextApp Echo3
v3.0.b4