Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.java.awt.peer.gtk
Class GtkVolatileImage  view GtkVolatileImage download GtkVolatileImage.java

java.lang.Object
  extended byjava.awt.Image
      extended byjava.awt.image.VolatileImage
          extended bygnu.java.awt.peer.gtk.GtkVolatileImage
All Implemented Interfaces:
java.awt.Transparency

public class GtkVolatileImage
extends java.awt.image.VolatileImage


Field Summary
private  java.awt.ImageCapabilities caps
           
private  int height
           
private  int width
           
 
Fields inherited from class java.awt.image.VolatileImage
IMAGE_INCOMPATIBLE, IMAGE_OK, IMAGE_RESTORED, transparency
 
Fields inherited from class java.awt.Image
SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedProperty
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
GtkVolatileImage(int width, int height)
           
GtkVolatileImage(int width, int height, java.awt.ImageCapabilities caps)
           
 
Method Summary
 boolean contentsLost()
          Returns true if the contents of the image buffer have been damaged or if the image buffer's resources have been reclaimed by the graphics system.
 java.awt.Graphics2D createGraphics()
          Returns a Graphics2D object that can be used to draw onto this image.
 java.awt.ImageCapabilities getCapabilities()
          Returns the capabilities of this image buffer.
 int getHeight()
          Returns the height of this image buffer.
 int getHeight(java.awt.image.ImageObserver observer)
          Returns the height of the image, or -1 if it is unknown.
 java.lang.Object getProperty(java.lang.String name, java.awt.image.ImageObserver observer)
          This method requests a named property for an object.
 java.awt.image.BufferedImage getSnapshot()
          Returns an image representing the current state of the volatile image buffer.
 int getWidth()
          Returns the width of this image buffer.
 int getWidth(java.awt.image.ImageObserver observer)
          Returns the width of the image, or -1 if it is unknown.
 int validate(java.awt.GraphicsConfiguration gc)
          Validates and restores this image.
 
Methods inherited from class java.awt.image.VolatileImage
flush, getGraphics, getSource, getTransparency
 
Methods inherited from class java.awt.Image
getScaledInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

private int width

height

private int height

caps

private java.awt.ImageCapabilities caps
Constructor Detail

GtkVolatileImage

public GtkVolatileImage(int width,
                        int height)

GtkVolatileImage

public GtkVolatileImage(int width,
                        int height,
                        java.awt.ImageCapabilities caps)
Method Detail

getSnapshot

public java.awt.image.BufferedImage getSnapshot()
Description copied from class: java.awt.image.VolatileImage
Returns an image representing the current state of the volatile image buffer. The returned image is static meaning that it is not updated after being created. It is a snapshot of the volatile image buffer at the time getSnapshot is called. This method, which reads pixels from the volatile image buffer, may be less-performant than methods that write pixels since VolatileImages are typically optimized for writing.


getWidth

public int getWidth()
Description copied from class: java.awt.image.VolatileImage
Returns the width of this image buffer.


getHeight

public int getHeight()
Description copied from class: java.awt.image.VolatileImage
Returns the height of this image buffer.


createGraphics

public java.awt.Graphics2D createGraphics()
Description copied from class: java.awt.image.VolatileImage
Returns a Graphics2D object that can be used to draw onto this image.


validate

public int validate(java.awt.GraphicsConfiguration gc)
Description copied from class: java.awt.image.VolatileImage
Validates and restores this image. If the image buffer has become unavailable for further use since the last call to validate, validate will allocate a new image buffer. The image is also "validated" against the GraphicsConfiguration parameter. "Validating" the image means checking that the capabilities it requires of the output device are indeed supported by the given output device. If the image's characteristics, which can be highly output device-specific, are not supported by the graphics configuration, then IMAGE_INCOMPATIBLE will be returned. This can happen, for example, if this image was created on one output device, then validated against a different output device with different capabilities. Calling validate with a NULL gc argument causes validate to skip the validation test.


contentsLost

public boolean contentsLost()
Description copied from class: java.awt.image.VolatileImage
Returns true if the contents of the image buffer have been damaged or if the image buffer's resources have been reclaimed by the graphics system. You should call this method after a series of rendering operations to or from the image, to see if the image buffer needs to be revalidated or the image re-rendered.


getCapabilities

public java.awt.ImageCapabilities getCapabilities()
Description copied from class: java.awt.image.VolatileImage
Returns the capabilities of this image buffer.


getProperty

public java.lang.Object getProperty(java.lang.String name,
                                    java.awt.image.ImageObserver observer)
Description copied from class: java.awt.Image
This method requests a named property for an object. The value of the property is returned. The value UndefinedProperty is returned if there is no property with the specified name. The value null is returned if the properties for the object are not yet known. In this case, the specified image observer is notified when the properties are known.


getWidth

public int getWidth(java.awt.image.ImageObserver observer)
Description copied from class: java.awt.Image
Returns the width of the image, or -1 if it is unknown. If the image width is unknown, the observer object will be notified when the value is known.


getHeight

public int getHeight(java.awt.image.ImageObserver observer)
Description copied from class: java.awt.Image
Returns the height of the image, or -1 if it is unknown. If the image height is unknown, the observer object will be notified when the value is known.