FileDocCategorySizeDatePackage
GraphicsConfiguration.javaAPI DocAndroid 1.5 API8128Wed May 06 22:41:54 BST 2009java.awt

GraphicsConfiguration

public abstract class GraphicsConfiguration extends Object
The GraphicsConfiguration class contains the characteristics of graphics devices such as a printer or monitor, and represents device's capabilities and modes. Many GraphicsConfiguration objects can be associated with single graphics device.
since
Android 1.0

Fields Summary
Constructors Summary
protected GraphicsConfiguration()
Constructor could not be used directly and should be obtained in extended classes.

    
Methods Summary
public abstract java.awt.image.BufferedImagecreateCompatibleImage(int width, int height)
Creates BufferedImage image object with a data layout and color model compatible with this GraphicsConfiguration with specified width and height parameters.

param
width the width of BufferedImage.
param
height the height of BufferedImage.
return
the BufferedImage object with specified width and height parameters.

public abstract java.awt.image.BufferedImagecreateCompatibleImage(int width, int height, int transparency)
Creates a BufferedImage that has the specified width, height, transparency and has a data layout and color model compatible with this GraphicsConfiguration.

param
width the width of image.
param
height the height of image.
param
transparency the transparency mode.
return
the BufferedImage object.

public java.awt.image.VolatileImagecreateCompatibleVolatileImage(int width, int height, java.awt.ImageCapabilities caps)
Creates VolatileImage with specified width, height, ImageCapabilities; a data layout and color model compatible with this GraphicsConfiguration.

param
width the width of image.
param
height the height of image.
param
caps the ImageCapabilities object.
return
the VolatileImage which data layout and color model compatible with this GraphicsConfiguration.
throws
AWTException if ImageCapabilities is not supported by the GraphicsConfiguration.

        VolatileImage res = createCompatibleVolatileImage(width, height);
        if (!res.getCapabilities().equals(caps)) {
            // awt.14A=Can not create VolatileImage with specified capabilities
            throw new AWTException(Messages.getString("awt.14A")); //$NON-NLS-1$
        }
        return res;
    
public java.awt.image.VolatileImagecreateCompatibleVolatileImage(int width, int height, java.awt.ImageCapabilities caps, int transparency)
Creates a VolatileImage with specified width, height, transparency and ImageCapabilities; a data layout and color model compatible with this GraphicsConfiguration.

param
width the width of image.
param
height the height of image.
param
caps the ImageCapabilities object.
param
transparency the Transparency mode: OPAQUE, BITMASK, or TRANSLUCENT.
return
the VolatileImage which data layout and color model compatible with this GraphicsConfiguration.
throws
AWTException if ImageCapabilities is not supported by the GraphicsConfiguration.

        VolatileImage res = createCompatibleVolatileImage(width, height, transparency);
        if (!res.getCapabilities().equals(caps)) {
            // awt.14A=Can not create VolatileImage with specified capabilities
            throw new AWTException(Messages.getString("awt.14A")); //$NON-NLS-1$
        }
        return res;
    
public abstract java.awt.image.VolatileImagecreateCompatibleVolatileImage(int width, int height)
Creates a VolatileImage that has the specified width and height and has a data layout and color model compatible with this GraphicsConfiguration.

param
width the width of image.
param
height the height of image.
return
the VolatileImage object.

public abstract java.awt.image.VolatileImagecreateCompatibleVolatileImage(int width, int height, int transparency)
Creates a VolatileImage that supports the specified width, height, transparency and has a data layout and color model compatible with this GraphicsConfiguration.

param
width the width of image.
param
height the height of image.
param
transparency the transparency mode.
return
the VolatileImage object.

public abstract java.awt.RectanglegetBounds()
Gets the bounds of area covered by the GraphicsConfiguration in the device coordinates space.

return
the Rectangle of GraphicsConfiguration's bounds.

public java.awt.BufferCapabilitiesgetBufferCapabilities()
Gets the buffering capabilities of the GraphicsConfiguration.

return
the BufferCapabilities object.

        return new BufferCapabilities(new ImageCapabilities(false), new ImageCapabilities(false),
                BufferCapabilities.FlipContents.UNDEFINED);
    
public abstract java.awt.image.ColorModelgetColorModel()
Gets the ColorModel of the GraphicsConfiguration.

return
the ColorModel object of the GraphicsConfiguration.

public abstract java.awt.image.ColorModelgetColorModel(int transparency)
Gets the ColorModel of the GraphicsConfiguration which supports specified Transparency.

param
transparency the Transparency mode: OPAQUE, BITMASK, or TRANSLUCENT.
return
the ColorModel of the GraphicsConfiguration which supports specified Transparency.

public abstract java.awt.geom.AffineTransformgetDefaultTransform()
Gets the default AffineTransform of the GraphicsConfiguration. This method translates user coordinates to device coordinates.

return
the default AffineTransform of the GraphicsConfiguration.

public abstract java.awt.GraphicsDevicegetDevice()
Gets the GraphicsDevice of the GraphicsConfiguration.

return
the GraphicsDevice of the GraphicsConfiguration.

public java.awt.ImageCapabilitiesgetImageCapabilities()
Gets the image capabilities of the GraphicsConfiguration.

return
the ImageCapabilities object.

        return new ImageCapabilities(false);
    
public abstract java.awt.geom.AffineTransformgetNormalizingTransform()
Gets the normalizing AffineTransform of the GraphicsConfiguration.

return
the normalizing AffineTransform of the GraphicsConfiguration.