java.awt

Class BufferCapabilities

public class BufferCapabilities extends Object implements Cloneable

A double-buffering capability descriptor. This class exposes details about the double-buffering algorithms used by image buffers. BufferCapabilities represents algorithms that involve at least two buffers but it can also specify so-called "multi-buffer" schemes involving more than two buffers. This class describes the capabilities of the front and back buffers as well as the results of "flipping" -- that is, what happens when an image is transferred from the back buffer to the front buffer. Flipping may or may not be supported or may be supported only in fullscreen mode. If it is not supported then "blitting" is implied -- that is, the contents of the back buffer are copied using a fast block transfer operation from the back buffer to the front buffer. The front buffer is the one that is displayed.

Since: 1.4

See Also: getCapabilities

Nested Class Summary
static classBufferCapabilities.FlipContents
A type-safe enumeration of buffer flipping results.
Constructor Summary
BufferCapabilities(ImageCapabilities frontCaps, ImageCapabilities backCaps, BufferCapabilities.FlipContents flip)
Creates a buffer capabilities object.
Method Summary
Objectclone()
Clone this buffering capability descriptor.
ImageCapabilitiesgetBackBufferCapabilities()
Retrieve the back buffer's image capabilities.
BufferCapabilities.FlipContentsgetFlipContents()
Retrieve the result of a flipping operation.
ImageCapabilitiesgetFrontBufferCapabilities()
Retrieve the front buffer's image capabilities.
booleanisFullScreenRequired()
Returns true if flipping is only supported in fullscreen mode.
booleanisMultiBufferAvailable()
Returns true if flipping can involve more than two buffers.
booleanisPageFlipping()
Return whether or not flipping is supported.

Constructor Detail

BufferCapabilities

public BufferCapabilities(ImageCapabilities frontCaps, ImageCapabilities backCaps, BufferCapabilities.FlipContents flip)
Creates a buffer capabilities object.

Parameters: frontCaps front buffer capabilities descriptor backCaps back buffer capabilities descriptor flip the results of a flip operation or null if flipping is not supported

Throws: IllegalArgumentException if frontCaps or backCaps is null

Method Detail

clone

public Object clone()
Clone this buffering capability descriptor.

Returns: a clone of this buffer capability descriptor

getBackBufferCapabilities

public ImageCapabilities getBackBufferCapabilities()
Retrieve the back buffer's image capabilities.

Returns: the back buffer's image capabilities

getFlipContents

public BufferCapabilities.FlipContents getFlipContents()
Retrieve the result of a flipping operation. If this method returns null then flipping is not supported. This implies that "blitting", a fast block transfer, is used to copy the contents of the back buffer to the front buffer. Other possible return values are:

Returns: the result of a flipping operation or null if flipping is not supported

getFrontBufferCapabilities

public ImageCapabilities getFrontBufferCapabilities()
Retrieve the front buffer's image capabilities.

Returns: the front buffer's image capabilities

isFullScreenRequired

public boolean isFullScreenRequired()
Returns true if flipping is only supported in fullscreen mode.

Returns: true if flipping is only supported in fullscreen mode, false otherwise

isMultiBufferAvailable

public boolean isMultiBufferAvailable()
Returns true if flipping can involve more than two buffers. One or more intermediate buffers may be available in addition to the front and back buffers.

Returns: true if there are more than two buffers available for flipping, false otherwise

isPageFlipping

public boolean isPageFlipping()
Return whether or not flipping is supported.

Returns: true if flipping is supported, false otherwise