java.awt
Class GraphicsConfiguration
java.lang.Object
|
+--java.awt.GraphicsConfiguration
public abstract class
GraphicsConfigurationextends
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:- Eric Blake <ebb9@email.byu.edu>
See Also:
GraphicsConfiguration
protected GraphicsConfiguration()
The default constructor.
See Also:
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:
- the buffered image, or null if none is supported
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:
- the buffered image, or null if none is supported
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:
- the buffered image, or null if none is supported
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:
- the buffered image, or null if none is supported
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:
- the color model, with transparency
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:
- the transformation from user space to device space
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:
- the normalized transformation from user space to device space
See Also:
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.