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

Quick Search    Search Deep

java.awt
Class Component.BltBufferStrategy  view Component.BltBufferStrategy download Component.BltBufferStrategy.java

java.lang.Object
  extended byjava.awt.image.BufferStrategy
      extended byjava.awt.Component.BltBufferStrategy
Direct Known Subclasses:
Canvas.CanvasBltBufferStrategy, Window.WindowBltBufferStrategy
Enclosing class:
Component

protected class Component.BltBufferStrategy
extends java.awt.image.BufferStrategy

This class provides support for blitting offscreen surfaces to a component.

Since:
1.4

Field Summary
protected  java.awt.image.VolatileImage[] backBuffers
          The back buffers used in this strategy.
protected  BufferCapabilities caps
          The capabilities of the image buffer.
private  java.awt.image.VolatileImage frontBuffer
          The front buffer.
protected  int height
          The height of the back buffers.
protected  boolean validatedContents
          Whether or not the image buffer resources are allocated and ready to be drawn into.
protected  int width
          The width of the back buffers.
 
Constructor Summary
protected Component.BltBufferStrategy(int numBuffers, BufferCapabilities caps)
          Creates a blitting buffer strategy.
 
Method Summary
 boolean contentsLost()
          Returns whether or not the image buffer resources have been lost.
 boolean contentsRestored()
          Returns whether or not the image buffer resources have been restored.
protected  void createBackBuffers(int numBuffers)
          Initializes the backBuffers field with an array of numBuffers VolatileImages.
 BufferCapabilities getCapabilities()
          Retrieves the capabilities of this buffer strategy.
 Graphics getDrawGraphics()
          Retrieves a graphics object that can be used to draw into this strategy's image buffer.
protected  void revalidate()
          Re-create the image buffer resources if they've been lost.
 void show()
          Bring the contents of the back buffer to the front buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

caps

protected BufferCapabilities caps
The capabilities of the image buffer.


backBuffers

protected java.awt.image.VolatileImage[] backBuffers
The back buffers used in this strategy.


validatedContents

protected boolean validatedContents
Whether or not the image buffer resources are allocated and ready to be drawn into.


width

protected int width
The width of the back buffers.


height

protected int height
The height of the back buffers.


frontBuffer

private java.awt.image.VolatileImage frontBuffer
The front buffer.

Constructor Detail

Component.BltBufferStrategy

protected Component.BltBufferStrategy(int numBuffers,
                                      BufferCapabilities caps)
Creates a blitting buffer strategy.

Method Detail

createBackBuffers

protected void createBackBuffers(int numBuffers)
Initializes the backBuffers field with an array of numBuffers VolatileImages.


getCapabilities

public BufferCapabilities getCapabilities()
Retrieves the capabilities of this buffer strategy.


getDrawGraphics

public Graphics getDrawGraphics()
Retrieves a graphics object that can be used to draw into this strategy's image buffer.


show

public void show()
Bring the contents of the back buffer to the front buffer.


revalidate

protected void revalidate()
Re-create the image buffer resources if they've been lost.


contentsLost

public boolean contentsLost()
Returns whether or not the image buffer resources have been lost.


contentsRestored

public boolean contentsRestored()
Returns whether or not the image buffer resources have been restored.