|
Modifier and Type |
Method and Description |
|
createCompatibleImage |
java.awt.image.BufferedImage createCompatibleImage(int width,
int height)
Returns a BufferedImage with a data layout and color model
compatible with this GraphicsConfiguration .
public java.awt.image.BufferedImage createCompatibleImage(int width,
int height)
-
Returns a BufferedImage with a data layout and color model
compatible with this GraphicsConfiguration . This
method has nothing to do with memory-mapping
a device. The returned BufferedImage has
a layout and color model that is closest to this native device
configuration and can therefore be optimally blitted to this
device.
- Parameters:
width - the width of the returned BufferedImage height - the height of the returned BufferedImage
- Returns:
- a
BufferedImage whose data layout and color
model is compatible with this GraphicsConfiguration .
|
|
createCompatibleImage |
java.awt.image.BufferedImage createCompatibleImage(int width,
int height,
int transparency)
Returns a BufferedImage that supports the specified
transparency and has a data layout and color model
compatible with this GraphicsConfiguration .
public java.awt.image.BufferedImage createCompatibleImage(int width,
int height,
int transparency)
-
Returns a BufferedImage that supports the specified
transparency and has a data layout and color model
compatible with this GraphicsConfiguration . This
method has nothing to do with memory-mapping
a device. The returned BufferedImage has a layout and
color model that can be optimally blitted to a device
with this GraphicsConfiguration .
- Parameters:
width - the width of the returned BufferedImage height - the height of the returned BufferedImage transparency - the specified transparency mode
- Returns:
- a
BufferedImage whose data layout and color
model is compatible with this GraphicsConfiguration
and also supports the specified transparency.
- Throws:
java.lang.IllegalArgumentException - if the transparency is not a valid value- See Also:
Transparency.OPAQUE ,
Transparency.BITMASK ,
Transparency.TRANSLUCENT
|
|
createCompatibleVolatileImage |
java.awt.image.VolatileImage createCompatibleVolatileImage(int width,
int height)
Returns a VolatileImage with a data layout and color model
compatible with this GraphicsConfiguration .
public java.awt.image.VolatileImage createCompatibleVolatileImage(int width,
int height)
-
Returns a VolatileImage with a data layout and color model
compatible with this GraphicsConfiguration .
The returned VolatileImage
may have data that is stored optimally for the underlying graphics
device and may therefore benefit from platform-specific rendering
acceleration.
- Parameters:
width - the width of the returned VolatileImage height - the height of the returned VolatileImage
- Returns:
- a
VolatileImage whose data layout and color
model is compatible with this GraphicsConfiguration . - Since:
- 1.4
- See Also:
Component.createVolatileImage(int, int)
|
|
createCompatibleVolatileImage |
java.awt.image.VolatileImage createCompatibleVolatileImage(int width,
int height,
ImageCapabilities caps)
Returns a VolatileImage with a data layout and color model
compatible with this GraphicsConfiguration , using
the specified image capabilities.
-
Returns a VolatileImage with a data layout and color model
compatible with this GraphicsConfiguration , using
the specified image capabilities.
If the caps parameter is null, it is effectively ignored
and this method will create a VolatileImage without regard to
ImageCapabilities constraints.
The returned VolatileImage has
a layout and color model that is closest to this native device
configuration and can therefore be optimally blitted to this
device.
- Parameters:
width - the width of the returned VolatileImage height - the height of the returned VolatileImage caps - the image capabilities
- Returns:
- a
VolatileImage whose data layout and color
model is compatible with this GraphicsConfiguration .
- Throws:
AWTException - if the supplied image capabilities could not
be met by this graphics configuration- Since:
- 1.4
|
|
createCompatibleVolatileImage |
java.awt.image.VolatileImage createCompatibleVolatileImage(int width,
int height,
ImageCapabilities caps,
int transparency)
Returns a VolatileImage with a data layout and color model
compatible with this GraphicsConfiguration , using
the specified image capabilities and transparency value.
public java.awt.image.VolatileImage createCompatibleVolatileImage(int width,
int height,
ImageCapabilities caps,
int transparency)
throws AWTException
-
Returns a VolatileImage with a data layout and color model
compatible with this GraphicsConfiguration , using
the specified image capabilities and transparency value.
If the caps parameter is null, it is effectively ignored
and this method will create a VolatileImage without regard to
ImageCapabilities constraints.
The returned VolatileImage has
a layout and color model that is closest to this native device
configuration and can therefore be optimally blitted to this
device.
- Parameters:
width - the width of the returned VolatileImage height - the height of the returned VolatileImage caps - the image capabilitiestransparency - the specified transparency mode
- Returns:
- a
VolatileImage whose data layout and color
model is compatible with this GraphicsConfiguration .
- Throws:
java.lang.IllegalArgumentException - if the transparency is not a valid value
AWTException - if the supplied image capabilities could not
be met by this graphics configuration- Since:
- 1.5
- See Also:
Transparency.OPAQUE ,
Transparency.BITMASK ,
Transparency.TRANSLUCENT ,
Component.createVolatileImage(int, int)
|
|
createCompatibleVolatileImage |
java.awt.image.VolatileImage createCompatibleVolatileImage(int width,
int height,
int transparency)
Returns a VolatileImage with a data layout and color model
compatible with this GraphicsConfiguration .
public java.awt.image.VolatileImage createCompatibleVolatileImage(int width,
int height,
int transparency)
-
Returns a VolatileImage with a data layout and color model
compatible with this GraphicsConfiguration .
The returned VolatileImage
may have data that is stored optimally for the underlying graphics
device and may therefore benefit from platform-specific rendering
acceleration.
- Parameters:
width - the width of the returned VolatileImage height - the height of the returned VolatileImage transparency - the specified transparency mode
- Returns:
- a
VolatileImage whose data layout and color
model is compatible with this GraphicsConfiguration .
- Throws:
java.lang.IllegalArgumentException - if the transparency is not a valid value- Since:
- 1.5
- See Also:
Transparency.OPAQUE ,
Transparency.BITMASK ,
Transparency.TRANSLUCENT ,
Component.createVolatileImage(int, int)
|
|
getBounds |
Returns the bounds of the GraphicsConfiguration
in the device coordinates.
-
Returns the bounds of the GraphicsConfiguration
in the device coordinates. In a multi-screen environment
with a virtual device, the bounds can have negative X
or Y origins.
- Returns:
- the bounds of the area covered by this
GraphicsConfiguration . - Since:
- 1.3
|
|
getBufferCapabilities |
Returns the buffering capabilities of this
GraphicsConfiguration .
-
Returns the buffering capabilities of this
GraphicsConfiguration .
- Returns:
- the buffering capabilities of this graphics
configuration object
- Since:
- 1.4
|
|
getColorModel |
abstract java.awt.image.ColorModel getColorModel()
Returns the ColorModel associated with this
GraphicsConfiguration .
public abstract java.awt.image.ColorModel getColorModel()
-
Returns the ColorModel associated with this
GraphicsConfiguration .
- Returns:
- a
ColorModel object that is associated with
this GraphicsConfiguration .
|
|
getColorModel |
abstract java.awt.image.ColorModel getColorModel(int transparency)
Returns the ColorModel associated with this
GraphicsConfiguration that supports the specified
transparency.
public abstract java.awt.image.ColorModel getColorModel(int transparency)
-
Returns the ColorModel associated with this
GraphicsConfiguration that supports the specified
transparency.
- Parameters:
transparency - the specified transparency mode
- Returns:
- a
ColorModel object that is associated with
this GraphicsConfiguration and supports the
specified transparency or null if the transparency is not a valid
value. - See Also:
Transparency.OPAQUE ,
Transparency.BITMASK ,
Transparency.TRANSLUCENT
|
|
getDefaultTransform |
abstract java.awt.geom.AffineTransform getDefaultTransform()
Returns the default AffineTransform for this
GraphicsConfiguration .
public abstract java.awt.geom.AffineTransform getDefaultTransform()
-
Returns the default AffineTransform for this
GraphicsConfiguration . This
AffineTransform is typically the Identity transform
for most normal screens. The default AffineTransform
maps coordinates onto the device such that 72 user space
coordinate units measure approximately 1 inch in device
space. The normalizing transform can be used to make
this mapping more exact. Coordinates in the coordinate space
defined by the default AffineTransform for screen and
printer devices have the origin in the upper left-hand corner of
the target region of the device, with X coordinates
increasing to the right and Y coordinates increasing downwards.
For image buffers not associated with a device, such as those not
created by createCompatibleImage ,
this AffineTransform is the Identity transform.
- Returns:
- the default
AffineTransform for this
GraphicsConfiguration .
|
|
getDevice |
Returns the GraphicsDevice associated with this
GraphicsConfiguration .
-
Returns the GraphicsDevice associated with this
GraphicsConfiguration .
- Returns:
- a
GraphicsDevice object that is
associated with this GraphicsConfiguration .
|
|
getImageCapabilities |
Returns the image capabilities of this
GraphicsConfiguration .
-
Returns the image capabilities of this
GraphicsConfiguration .
- Returns:
- the image capabilities of this graphics
configuration object
- Since:
- 1.4
|
|
getNormalizingTransform |
abstract java.awt.geom.AffineTransform getNormalizingTransform()
Returns a AffineTransform that can be concatenated
with the default AffineTransform
of a GraphicsConfiguration so that 72 units in user
space equals 1 inch in device space.
public abstract java.awt.geom.AffineTransform getNormalizingTransform()
-
Returns a AffineTransform that can be concatenated
with the default AffineTransform
of a GraphicsConfiguration so that 72 units in user
space equals 1 inch in device space.
For a particular Graphics2D , g, one
can reset the transformation to create
such a mapping by using the following pseudocode:
GraphicsConfiguration gc = g.getDeviceConfiguration();
g.setTransform(gc.getDefaultTransform());
g.transform(gc.getNormalizingTransform());
Note that sometimes this AffineTransform is identity,
such as for printers or metafile output, and that this
AffineTransform is only as accurate as the information
supplied by the underlying system. For image buffers not
associated with a device, such as those not created by
createCompatibleImage , this
AffineTransform is the Identity transform
since there is no valid distance measurement.
- Returns:
- an
AffineTransform to concatenate to the
default AffineTransform so that 72 units in user
space is mapped to 1 inch in device space.
|
|
isTranslucencyCapable |
boolean isTranslucencyCapable()
public boolean isTranslucencyCapable()
-
- Returns:
- whether the given GraphicsConfiguration supports
the translucency effects.
- Since:
- 1.7
- See Also:
Window.setBackground(Color)
|