- java.lang.Object
-
- java.awt.image.BufferStrategy
-
- java.awt.Component.FlipBufferStrategy
-
-
|
Modifier and Type |
Field and Description |
|
caps |
The buffering capabilities
-
The buffering capabilities
|
|
drawBuffer |
protected Image drawBuffer
The drawing buffer
protected Image drawBuffer
-
The drawing buffer
|
|
drawVBuffer |
protected java.awt.image.VolatileImage drawVBuffer
The drawing buffer as a volatile image
protected java.awt.image.VolatileImage drawVBuffer
-
The drawing buffer as a volatile image
|
|
numBuffers |
protected int numBuffers
The number of buffers
protected int numBuffers
-
The number of buffers
|
|
validatedContents |
protected boolean validatedContents
Whether or not the drawing buffer has been recently restored from
a lost state.
protected boolean validatedContents
-
Whether or not the drawing buffer has been recently restored from
a lost state.
|
-
|
Modifier |
Constructor and Description |
|
Component.FlipBufferStrategy |
protected Component.FlipBufferStrategy(int numBuffers,
BufferCapabilities caps)
Creates a new flipping buffer strategy for this component.
-
Creates a new flipping buffer strategy for this component.
The component must be a Canvas or Window .
- Parameters:
numBuffers - the number of bufferscaps - the capabilities of the buffers
- Throws:
AWTException - if the capabilities supplied could not be
supported or met
java.lang.ClassCastException - if the component is not a canvas or
window.
java.lang.IllegalStateException - if the component has no peer
java.lang.IllegalArgumentException - if numBuffers is less than two,
or if BufferCapabilities.isPageFlipping is not
true .- See Also:
Canvas ,
Window ,
createBuffers(int, BufferCapabilities)
|
-
|
Modifier and Type |
Method and Description |
|
contentsLost |
boolean contentsLost()
Returns whether the drawing buffer was lost since the last call to
getDrawGraphics .
public boolean contentsLost()
-
Description copied from class: java.awt.image.BufferStrategy
Returns whether the drawing buffer was lost since the last call to
getDrawGraphics . Since the buffers in a buffer strategy
are usually type VolatileImage , they may become lost.
For a discussion on lost buffers, see VolatileImage .
- Specified by:
contentsLost in class java.awt.image.BufferStrategy
- Returns:
- whether the drawing buffer was lost since the last call to
getDrawGraphics - See Also:
VolatileImage
|
|
contentsRestored |
boolean contentsRestored()
Returns whether the drawing buffer was recently restored from a lost
state and reinitialized to the default background color (white).
public boolean contentsRestored()
-
Description copied from class: java.awt.image.BufferStrategy
Returns whether the drawing buffer was recently restored from a lost
state and reinitialized to the default background color (white).
Since the buffers in a buffer strategy are usually type
VolatileImage , they may become lost. If a surface has
been recently restored from a lost state since the last call to
getDrawGraphics , it may require repainting.
For a discussion on lost buffers, see VolatileImage .
- Specified by:
contentsRestored in class java.awt.image.BufferStrategy
- Returns:
- whether the drawing buffer was recently restored from a lost
state and reinitialized to the default background color (white)
- See Also:
VolatileImage
|
|
createBuffers |
protected void createBuffers(int numBuffers,
BufferCapabilities caps)
Creates one or more complex, flipping buffers with the given
capabilities.
-
Creates one or more complex, flipping buffers with the given
capabilities.
- Parameters:
numBuffers - number of buffers to create; must be greater than
onecaps - the capabilities of the buffers.
BufferCapabilities.isPageFlipping must be
true .
- Throws:
AWTException - if the capabilities supplied could not be
supported or met
java.lang.IllegalStateException - if the component has no peer
java.lang.IllegalArgumentException - if numBuffers is less than two,
or if BufferCapabilities.isPageFlipping is not
true .- See Also:
BufferCapabilities.isPageFlipping()
|
|
destroyBuffers |
protected void destroyBuffers()
Destroys the buffers created through this object
protected void destroyBuffers()
-
Destroys the buffers created through this object
|
|
dispose |
void dispose()
Releases system resources currently consumed by this
BufferStrategy and
removes it from the associated Component.
|
|
flip |
protected void flip(BufferCapabilities.FlipContents flipAction)
Flipping moves the contents of the back buffer to the front buffer,
either by copying or by moving the video pointer.
-
Flipping moves the contents of the back buffer to the front buffer,
either by copying or by moving the video pointer.
- Parameters:
flipAction - an integer value describing the flipping action
for the contents of the back buffer. This should be one of the
values of the BufferCapabilities.FlipContents
property.
- Throws:
java.lang.IllegalStateException - if the buffers have not yet
been created- See Also:
BufferCapabilities.getFlipContents()
|
|
getBackBuffer |
protected Image getBackBuffer()
protected Image getBackBuffer()
|
|
getCapabilities |
Returns the BufferCapabilities for this
BufferStrategy .
-
Description copied from class: java.awt.image.BufferStrategy
Returns the BufferCapabilities for this
BufferStrategy .
- Specified by:
getCapabilities in class java.awt.image.BufferStrategy
- Returns:
- the buffering capabilities of this strategy
|
|
getDrawGraphics |
Creates a graphics context for the drawing buffer.
-
Description copied from class: java.awt.image.BufferStrategy
Creates a graphics context for the drawing buffer. This method may not
be synchronized for performance reasons; use of this method by multiple
threads should be handled at the application level. Disposal of the
graphics object obtained must be handled by the application.
- Specified by:
getDrawGraphics in class java.awt.image.BufferStrategy
- Returns:
- the graphics on the drawing buffer. This method may not
be synchronized for performance reasons; use of this method by multiple
threads should be handled at the application level. Disposal of the
graphics object must be handled by the application.
|
|
revalidate |
protected void revalidate()
Restore the drawing buffer if it has been lost
protected void revalidate()
-
Restore the drawing buffer if it has been lost
|
|
show |
void show()
Makes the next available buffer visible by either blitting or
flipping.
public void show()
-
Makes the next available buffer visible by either blitting or
flipping.
- Specified by:
show in class java.awt.image.BufferStrategy
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
This document was created by
Dulcet from the OpenJDK sources.
Copyright © 1993, 2012 Oracle and/or its affiliates. All rights reserved.