|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.image.BufferStrategy
java.awt.Component.BltBufferStrategy
protected class Component.BltBufferStrategy
This class provides support for blitting offscreen surfaces to a component.
BufferStrategy
Field Summary | |
---|---|
protected VolatileImage[] |
backBuffers
The back buffers used in this strategy. |
protected BufferCapabilities |
caps
The capabilities of the image 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 |
---|
protected BufferCapabilities caps
protected VolatileImage[] backBuffers
protected boolean validatedContents
protected int width
protected int height
Constructor Detail |
---|
protected Component.BltBufferStrategy(int numBuffers, BufferCapabilities caps)
numBuffers
- the number of buffers, including the front
buffercaps
- the capabilities of this strategyMethod Detail |
---|
protected void createBackBuffers(int numBuffers)
numBuffers
- the number of backbuffers to createpublic BufferCapabilities getCapabilities()
getCapabilities
in class BufferStrategy
public Graphics getDrawGraphics()
getDrawGraphics
in class BufferStrategy
public void show()
show
in class BufferStrategy
protected void revalidate()
public boolean contentsLost()
contentsLost
in class BufferStrategy
public boolean contentsRestored()
contentsRestored
in class BufferStrategy
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |