NextApp Echo
1.1.4

nextapp.echo
Class AwtImageReference

java.lang.Object
  extended bynextapp.echo.AbstractImageReference
      extended bynextapp.echo.AwtImageReference
All Implemented Interfaces:
ImageReference, java.io.Serializable

public class AwtImageReference
extends AbstractImageReference

A reference to a java.awt.Image. The JVM running the Echo Application Container will require access to a graphics context if AwtImageReferences are used.

See Also:
Serialized Form

Field Summary
private  java.awt.Image image
           
 
Fields inherited from class nextapp.echo.AbstractImageReference
listenerList
 
Fields inherited from interface nextapp.echo.ImageReference
SIZE_UNKNOWN
 
Constructor Summary
AwtImageReference(java.awt.Image image)
          Creates a reference to a java.awt.Image.
 
Method Summary
 int getHeight()
          Returns the height of the image in pixels.
 java.awt.Image getImage()
          Retrieves the image.
 int getWidth()
          Returns the width of the image in pixels.
private  void readObject(java.io.ObjectInputStream in)
           
private  void writeObject(java.io.ObjectOutputStream out)
           
 
Methods inherited from class nextapp.echo.AbstractImageReference
addImageUpdateListener, removeImageUpdateListener, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

private transient java.awt.Image image
Constructor Detail

AwtImageReference

public AwtImageReference(java.awt.Image image)
Creates a reference to a java.awt.Image. If the image is modified after instantiation you should dispose of any AwtImageReference instances that reference it and create new ones.

Parameters:
image - A java.awt.Image to be displayed. If you intend to extend this class and override the getImage() method to return images only as they are needed, then you may pass null to this parameter.
Method Detail

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.


getHeight

public int getHeight()
Returns the height of the image in pixels.

Returns:
The height of the image in pixels.
See Also:
ImageReference.getHeight()

getWidth

public int getWidth()
Returns the width of the image in pixels.

Returns:
The width of the image in pixels.
See Also:
ImageReference.getWidth()

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
Serializable

writeObject

private void writeObject(java.io.ObjectOutputStream out)
                  throws java.io.IOException
Throws:
java.io.IOException
See Also:
Serializable

NextApp Echo
1.1.4