java.awt
protected class Component.BltBufferStrategy extends BufferStrategy
BufferStrategy
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier | Constructor and Description |
---|---|
protected |
Component.BltBufferStrategy(int numBuffers,
BufferCapabilities caps)
Creates a blitting buffer strategy.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected BufferCapabilities caps
protected VolatileImage[] backBuffers
protected boolean validatedContents
protected int width
protected int height
protected Component.BltBufferStrategy(int numBuffers, BufferCapabilities caps)
numBuffers
- the number of buffers, including the front
buffercaps
- the capabilities of this strategyprotected 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