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 buffers
- caps - the capabilities of the buffers
Throws: - AWTException - if the capabilities supplied could not be
supported or met
- ClassCastException - if the component is not a canvas or
window.
See Also:Canvas,
Window,
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
one
- caps - the capabilities of the buffers.
BufferCapabilities.isPageFlipping must be
true.
Throws: - AWTException - if the capabilities supplied could not be
supported or met
- IllegalStateException - if the component has no peer
- IllegalArgumentException - if numBuffers is less than two,
or if BufferCapabilities.isPageFlipping is not
true.
See Also:BufferCapabilities.isPageFlipping(),
Releases system resources currently consumed by this
BufferStrategy and
removes it from the associated Component.
Releases system resources currently consumed by this BufferStrategy and removes it from the associated Component. After invoking this method, getBufferStrategy will return null. Trying to use a BufferStrategy after it has been disposed will result in undefined behavior.
Since:
1.6
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: - IllegalStateException - if the buffers have not yet
been created
See Also:BufferCapabilities.getFlipContents(),
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.
Whether or not the drawing buffer has been recently restored from
a lost state.
pack-private
int width
Size of the back buffers.
Size of the back buffers. (Note: these fields were added in 6.0 but kept package-private to avoid exposing them in the spec. None of these fields/methods really should have been marked protected when they were introduced in 1.4, but now we just have to live with that decision.)