Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt

Class GraphicsConfiguration

java.lang.Object
|
+--java.awt.GraphicsConfiguration


public abstract class GraphicsConfiguration

extends Object

This class describes the configuration of various graphics devices, such as a monitor or printer. Different configurations may exist for the same device, according to the different native modes supported.

Virtual devices are supported (for example, in a multiple screen environment, a virtual device covers all screens simultaneously); the configuration will have a non-zero relative coordinate system in such a case.

Since:Author:See Also:

Constructor Summary

GraphicsConfiguration()

The default constructor.

Method Summary

java.awt.image.BufferedImagecreateCompatibleImage(int w, int h)

Returns a buffered image optimized to this device, so that blitting can be supported in the buffered image.
java.awt.image.BufferedImagecreateCompatibleImage(int w, int h, int transparency)

Returns a buffered image optimized to this device, and with the specified transparency, so that blitting can be supported in the buffered image.
java.awt.image.VolatileImagecreateCompatibleVolatileImage(int w, int h)

Returns a buffered volatile image optimized to this device, so that blitting can be supported in the buffered image.
java.awt.image.VolatileImagecreateCompatibleVolatileImage(int w, int h, java.awt.ImageCapabilities caps)

Returns a buffered volatile image optimized to this device, and with the given capabilities, so that blitting can be supported in the buffered image.
java.awt.RectanglegetBounds()

Returns the bounds of the configuration, in device coordinates.
java.awt.BufferCapabilitiesgetBufferCapabilities()

Returns the buffering capabilities of this configuration.
java.awt.image.ColorModelgetColorModel()

Gets the color model of the corresponding device.
java.awt.image.ColorModelgetColorModel(int transparency)

Gets a color model for the corresponding device which supports the desired transparency level.
java.awt.geom.AffineTransformgetDefaultTransform()

Returns a transform that maps user coordinates to device coordinates.
java.awt.GraphicsDevicegetDevice()

Gets the associated device that this configuration describes.
java.awt.ImageCapabilitiesgetImageCapabilities()

Returns the imaging capabilities of this configuration.
java.awt.geom.AffineTransformgetNormalizingTransform()

Returns a transform that maps user coordinates to device coordinates.

Constructor Details

GraphicsConfiguration

protected GraphicsConfiguration()

The default constructor.

See Also:


Method Details

createCompatibleImage

public BufferedImage createCompatibleImage(int w, int h)

Returns a buffered image optimized to this device, so that blitting can be supported in the buffered image.

Parameters:

Returns:


createCompatibleImage

public BufferedImage createCompatibleImage(int w, int h, int transparency)

Returns a buffered image optimized to this device, and with the specified transparency, so that blitting can be supported in the buffered image.

Parameters:

Returns:

See Also:


createCompatibleVolatileImage

public VolatileImage createCompatibleVolatileImage(int w, int h)

Returns a buffered volatile image optimized to this device, so that blitting can be supported in the buffered image. Because the buffer is volatile, it can be optimized by native graphics accelerators.

Since:Parameters:

Returns:

See Also:


createCompatibleVolatileImage

public VolatileImage createCompatibleVolatileImage(int w, int h, java.awt.ImageCapabilities caps)

Returns a buffered volatile image optimized to this device, and with the given capabilities, so that blitting can be supported in the buffered image. Because the buffer is volatile, it can be optimized by native graphics accelerators.

Since:Parameters:

Returns:

Throws:


getBounds

public Rectangle getBounds()

Returns the bounds of the configuration, in device coordinates. If this is a virtual device (for example, encompassing several screens), the bounds may have a non-zero origin.

Since:Returns:


getBufferCapabilities

public BufferCapabilities getBufferCapabilities()

Returns the buffering capabilities of this configuration.

Since:Returns:


getColorModel

public ColorModel getColorModel()

Gets the color model of the corresponding device.

Returns:


getColorModel

public ColorModel getColorModel(int transparency)

Gets a color model for the corresponding device which supports the desired transparency level.

Parameters:

Returns:

See Also:


getDefaultTransform

public AffineTransform getDefaultTransform()

Returns a transform that maps user coordinates to device coordinates. The preferred mapping is about 72 user units to 1 inch (2.54 cm) of physical space. This is often the identity transform. The device coordinates have the origin at the upper left, with increasing x to the right, and increasing y to the bottom.

Returns:

See Also:


getDevice

public GraphicsDevice getDevice()

Gets the associated device that this configuration describes.

Returns:


getImageCapabilities

public ImageCapabilities getImageCapabilities()

Returns the imaging capabilities of this configuration.

Since:Returns:


getNormalizingTransform

public AffineTransform getNormalizingTransform()

Returns a transform that maps user coordinates to device coordinates. The exact mapping is 72 user units to 1 inch (2.54 cm) of physical space. This is often the identity transform. The device coordinates have the origin at the upper left, with increasing x to the right, and increasing y to the bottom. Note that this is more accurate (and thus, sometimes more costly) than the default transform.

Returns:

See Also: