FileDocCategorySizeDatePackage
VolatileImage.javaAPI DocAndroid 1.5 API4252Wed May 06 22:41:54 BST 2009java.awt.image

VolatileImage

public abstract class VolatileImage extends Image implements Transparency
The VolatileImage abstract class represents an image which can lose its contents at any point. VolatileImage objects are device specific. This class provides methods for checking if operation of this image are compatible for the GraphicsConfiguration.
since
Android 1.0

Fields Summary
public static final int
IMAGE_INCOMPATIBLE
The Constant IMAGE_INCOMPATIBLE indicates that this VolatileImage is not applicable for the GraphicsConfiguration object.
public static final int
IMAGE_OK
The Constant IMAGE_OK indicates that VolatileImage is ready for using.
public static final int
IMAGE_RESTORED
The Constant IMAGE_RESTORED indicates that VolatileImage will be ready to use after restoring.
protected int
transparency
The transparency value of this image.
Constructors Summary
public VolatileImage()
Instantiates a new VolatileImage object.


              
      
        super();
    
Methods Summary
public abstract booleancontentsLost()
Returns true if rendering data is lost during validating. This method should be called after rendering operation of image.

return
true, if contents lost during validating, false otherwise.

public abstract java.awt.Graphics2DcreateGraphics()
Creates a Graphics2D used to draw in this VolatileImage.

return
the Graphics2D object.

public voidflush()

    
public abstract java.awt.ImageCapabilitiesgetCapabilities()
Gets the ImageCapabilities of this VolatileImage.

return
the ImageCapabilities of this VolatileImage.

public java.awt.GraphicsgetGraphics()

        return createGraphics();
    
public abstract intgetHeight()
Gets the height of this VolatileImage.

return
the height of this VolatileImage.

public abstract java.awt.image.BufferedImagegetSnapshot()
Gets a BufferedImage representation of current VolatileImage that won't be affected by any changes to this VolatileImage.

return
a BufferedImage representation of current VolatileImage.

public java.awt.image.ImageProducergetSource()

        return getSnapshot().getSource();
    
public intgetTransparency()

        return transparency;
    
public abstract intgetWidth()
Gets the width of this VolatileImage.

return
the width of this VolatileImage.

public abstract intvalidate(java.awt.GraphicsConfiguration gc)
Validates the drawing surface of the image if the surface had been lost and if the specified GraphicsConfiguration object is applicable to this image.

param
gc the GraphicsConfiguration object.
return
one of the image status constants: IMAGE_OK, IMAGE_RESTORED or IMAGE_INCOMPATIBLE.