APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.awt

public Class X11GraphicsConfig

extends GraphicsConfiguration
implements ProxiedGraphicsConfig, Factory
Class Inheritance
All Implemented Interfaces
sun.awt.image.SurfaceManager.Factory, sun.awt.image.SurfaceManager.ProxiedGraphicsConfig
Known Direct Subclasses
sun.java2d.opengl.GLXGraphicsConfig, sun.java2d.xr.XRGraphicsConfig
Imports
java.awt.AWTException, .BufferCapabilities, .Component, .GraphicsConfiguration, .GraphicsDevice, .Image, .ImageCapabilities, .Rectangle, .Toolkit, .Transparency, java.awt.color.ColorSpace, java.awt.geom.AffineTransform, java.awt.image.ColorModel, .ComponentColorModel, .DataBuffer, .DirectColorModel, .VolatileImage, .WritableRaster, sun.awt.image.OffScreenImage, .SunVolatileImage, .SurfaceManager, .VolatileSurfaceManager, sun.java2d.Disposer, .DisposerRecord, .SurfaceData, sun.java2d.loops.CompositeType, .RenderLoops, .SurfaceType, sun.java2d.pipe.Region, sun.java2d.x11.X11SurfaceData, .X11VolatileSurfaceManager

This is an implementation of a GraphicsConfiguration object for a single X11 visual.
See Also
java.awt.GraphicsEnvironment, GraphicsDevice

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
pack-priv long
protected int
private BufferCapabilities
pack-priv int
pack-priv ColorModel
pack-priv int
private final X11GraphicsDevice
private Object
pack-priv boolean
private static ImageCapabilities
public RenderLoops
protected SurfaceType
protected int

Constructor Summary

AccessConstructor and Description
protected
X11GraphicsConfig(X11GraphicsDevice device, int visualnum, int depth, int colormap, boolean doubleBuffer)

Method Summary

Modifier and TypeMethod and Description
public static ComponentColorModel
public Image
createAcceleratedImage(Component target, int width, int height)

Creates a new hidden-acceleration image of the given width and height that is associated with the target Component.

private native long
createBackBuffer(long window, int swapAction)

The following methods correspond to the multibuffering methods in X11ComponentPeer.java...

public long
createBackBuffer(X11ComponentPeer peer, int numBuffers, BufferCapabilities caps)

Attempts to create an XDBE-based backbuffer for the given peer.

public VolatileImage
createBackBufferImage(Component target, long backBuffer)

Creates a VolatileImage that essentially wraps the target Component's backbuffer, using the provided backbuffer handle.

public static DirectColorModel
createDCM32(int rMask, int gMask, int bMask, int aMask, boolean aPre)

public SurfaceData
createSurfaceData(X11ComponentPeer peer)

Creates a new SurfaceData that will be associated with the given X11ComponentPeer.

public VolatileSurfaceManager
createVolatileManager(SunVolatileImage image, Object context)

Implements sun.awt.image.SurfaceManager.Factory.createVolatileManager.

Creates a new instance of a VolatileSurfaceManager given a compatible SunVolatileImage.

public native void
destroyBackBuffer(long backBuffer)

Destroys the backbuffer object represented by the given handle value.

private static native void
dispose(long x11ConfigData)

public void
flip(X11ComponentPeer peer, Component target, VolatileImage xBackBuffer, int x1, int y1, int x2, int y2, BufferCapabilities.FlipContents flipAction)

Performs the native XDBE flip operation for the given target Component.

public long
public int
getBitsPerPixel()

Returns a number of bits allocated per pixel (might be different from depth)

public final Rectangle
getBounds()

Implements abstract java.awt.GraphicsConfiguration.getBounds.

Returns the bounds of the GraphicsConfiguration in the device coordinates.

public BufferCapabilities
getBufferCapabilities()

Overrides java.awt.GraphicsConfiguration.getBufferCapabilities.

Returns the buffering capabilities of this GraphicsConfiguration.

public int
getColormap()

Returns the colormap associated with this configuration.

public synchronized ColorModel
getColorModel()

Implements abstract java.awt.GraphicsConfiguration.getColorModel.

Returns the color model associated with this configuration.

public ColorModel
getColorModel(int transparency)

Implements abstract java.awt.GraphicsConfiguration.getColorModel.

Returns the color model associated with this configuration that supports the specified transparency.

public static X11GraphicsConfig
getConfig(X11GraphicsDevice device, int visualnum, int depth, int colormap, boolean doubleBuffer)

public static X11GraphicsConfig
getConfig(X11GraphicsDevice device, int visualnum, int depth, int colormap, int type)

public AffineTransform
getDefaultTransform()

Implements abstract java.awt.GraphicsConfiguration.getDefaultTransform.

Returns the default Transform for this configuration.

public int
getDepth()

Returns the depth associated with this configuration.

public X11GraphicsDevice
getDevice()

Implements abstract java.awt.GraphicsConfiguration.getDevice.

Return the graphics device associated with this configuration.

public ImageCapabilities
getImageCapabilities()

Overrides java.awt.GraphicsConfiguration.getImageCapabilities.

Returns the image capabilities of this GraphicsConfiguration.

public AffineTransform
getNormalizingTransform()

Implements abstract java.awt.GraphicsConfiguration.getNormalizingTransform.

Returns a Transform that can be composed with the default Transform of a Graphics2D so that 72 units in user space will equal 1 inch in device space.

private native int
public int
public synchronized RenderLoops
getSolidLoops(SurfaceType stype)

Return the RenderLoops this type of destination uses for solid fills and strokes.

public SurfaceManager.ProxyCache
getSurfaceDataProxyCache()

Implements sun.awt.image.SurfaceManager.ProxiedGraphicsConfig.getSurfaceDataProxyCache.

Return the cache that destination surfaces created on the given GraphicsConfiguration use to store SurfaceDataProxy objects for their cached copies.

public synchronized SurfaceType
private static int
getSwapAction(BufferCapabilities.FlipContents flipAction)

Maps the given FlipContents constant to the associated XDBE swap action constant.

public int
getVisual()

Returns the visual id associated with this configuration.

private native double
getXResolution(int screen)

private native double
getYResolution(int screen)

private native void
init(int visualNum, int screen)

private static native void
public boolean
public boolean
isTranslucencyCapable()

Overrides java.awt.GraphicsConfiguration.isTranslucencyCapable.

Returns whether this GraphicsConfiguration supports the PERPIXEL_TRANSLUCENT kind of translucency.

private native boolean
isTranslucencyCapable(long x11ConfigData)

private native ColorModel
public int
scaleDown(int x)

public int
scaleUp(int x)

private native void
swapBuffers(long window, int swapAction)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.awt.GraphicsConfiguration:
createCompatibleImagecreateCompatibleImagecreateCompatibleVolatileImagecreateCompatibleVolatileImagecreateCompatibleVolatileImagecreateCompatibleVolatileImage

Field Detail

aDataback to summary
pack-priv long aData
bitsPerPixelback to summary
protected int bitsPerPixel
bufferCapsback to summary
private BufferCapabilities bufferCaps
colormapback to summary
pack-priv int colormap
colorModelback to summary
pack-priv ColorModel colorModel
depthback to summary
pack-priv int depth
deviceback to summary
private final X11GraphicsDevice device
disposerReferentback to summary
private Object disposerReferent
doubleBufferback to summary
pack-priv boolean doubleBuffer
imageCapsback to summary
private static ImageCapabilities imageCaps
solidloopsback to summary
public RenderLoops solidloops
surfaceTypeback to summary
protected SurfaceType surfaceType
visualback to summary
protected int visual

Constructor Detail

X11GraphicsConfigback to summary
protected X11GraphicsConfig(X11GraphicsDevice device, int visualnum, int depth, int colormap, boolean doubleBuffer)

Method Detail

createABGRCCMback to summary
public static ComponentColorModel createABGRCCM()
createAcceleratedImageback to summary
public Image createAcceleratedImage(Component target, int width, int height)

Creates a new hidden-acceleration image of the given width and height that is associated with the target Component.

createBackBufferback to summary
private native long createBackBuffer(long window, int swapAction)

The following methods correspond to the multibuffering methods in X11ComponentPeer.java...

createBackBufferback to summary
public long createBackBuffer(X11ComponentPeer peer, int numBuffers, BufferCapabilities caps) throws AWTException

Attempts to create an XDBE-based backbuffer for the given peer. If the requested configuration is not natively supported, an AWTException is thrown. Otherwise, if the backbuffer creation is successful, a handle to the native backbuffer is returned.

createBackBufferImageback to summary
public VolatileImage createBackBufferImage(Component target, long backBuffer)

Creates a VolatileImage that essentially wraps the target Component's backbuffer, using the provided backbuffer handle.

createDCM32back to summary
public static DirectColorModel createDCM32(int rMask, int gMask, int bMask, int aMask, boolean aPre)
createSurfaceDataback to summary
public SurfaceData createSurfaceData(X11ComponentPeer peer)

Creates a new SurfaceData that will be associated with the given X11ComponentPeer.

createVolatileManagerback to summary
public VolatileSurfaceManager createVolatileManager(SunVolatileImage image, Object context)

Implements sun.awt.image.SurfaceManager.Factory.createVolatileManager.

Doc from sun.awt.image.SurfaceManager.Factory.createVolatileManager.

Creates a new instance of a VolatileSurfaceManager given a compatible SunVolatileImage. An optional context Object can be supplied as a way for the caller to pass pipeline-specific context data to the VolatileSurfaceManager (such as a backbuffer handle, for example).

Annotations
@Override
destroyBackBufferback to summary
public native void destroyBackBuffer(long backBuffer)

Destroys the backbuffer object represented by the given handle value.

disposeback to summary
private static native void dispose(long x11ConfigData)
flipback to summary
public void flip(X11ComponentPeer peer, Component target, VolatileImage xBackBuffer, int x1, int y1, int x2, int y2, BufferCapabilities.FlipContents flipAction)

Performs the native XDBE flip operation for the given target Component.

getADataback to summary
public long getAData()
getBitsPerPixelback to summary
public int getBitsPerPixel()

Returns a number of bits allocated per pixel (might be different from depth)

getBoundsback to summary
public final Rectangle getBounds()

Implements abstract java.awt.GraphicsConfiguration.getBounds.

Doc from java.awt.GraphicsConfiguration.getBounds.

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.

Annotations
@Override
getBufferCapabilitiesback to summary
public BufferCapabilities getBufferCapabilities()

Overrides java.awt.GraphicsConfiguration.getBufferCapabilities.

Doc from java.awt.GraphicsConfiguration.getBufferCapabilities.

Returns the buffering capabilities of this GraphicsConfiguration.

Annotations
@Override
getColormapback to summary
public int getColormap()

Returns the colormap associated with this configuration.

getColorModelback to summary
public synchronized ColorModel getColorModel()

Implements abstract java.awt.GraphicsConfiguration.getColorModel.

Returns the color model associated with this configuration.

Annotations
@Override
getColorModelback to summary
public ColorModel getColorModel(int transparency)

Implements abstract java.awt.GraphicsConfiguration.getColorModel.

Returns the color model associated with this configuration that supports the specified transparency.

Annotations
@Override
getConfigback to summary
public static X11GraphicsConfig getConfig(X11GraphicsDevice device, int visualnum, int depth, int colormap, boolean doubleBuffer)
getConfigback to summary
public static X11GraphicsConfig getConfig(X11GraphicsDevice device, int visualnum, int depth, int colormap, int type)
getDefaultTransformback to summary
public AffineTransform getDefaultTransform()

Implements abstract java.awt.GraphicsConfiguration.getDefaultTransform.

Returns the default Transform for this configuration. This Transform is typically the Identity transform for most normal screens. Device coordinates for screen and printer devices will 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, this Transform will be the Identity transform.

Annotations
@Override
getDepthback to summary
public int getDepth()

Returns the depth associated with this configuration.

getDeviceback to summary
public X11GraphicsDevice getDevice()

Implements abstract java.awt.GraphicsConfiguration.getDevice.

Return the graphics device associated with this configuration.

Annotations
@Override
getImageCapabilitiesback to summary
public ImageCapabilities getImageCapabilities()

Overrides java.awt.GraphicsConfiguration.getImageCapabilities.

Doc from java.awt.GraphicsConfiguration.getImageCapabilities.

Returns the image capabilities of this GraphicsConfiguration.

Annotations
@Override
getNormalizingTransformback to summary
public AffineTransform getNormalizingTransform()

Implements abstract java.awt.GraphicsConfiguration.getNormalizingTransform.

Returns a Transform that can be composed with the default Transform of a Graphics2D so that 72 units in user space will equal 1 inch in device space. Given a Graphics2D, g, one can reset the transformation to create such a mapping by using the following pseudocode:

     GraphicsConfiguration gc = g.getGraphicsConfiguration();

     g.setTransform(gc.getDefaultTransform());
     g.transform(gc.getNormalizingTransform());
Note that sometimes this Transform will be identity (e.g. for printers or metafile output) and that this Transform is only as accurate as the information supplied by the underlying system. For image buffers, this Transform will be the Identity transform, since there is no valid distance measurement.
Annotations
@Override
getNumColorsback to summary
private native int getNumColors()
getScaleback to summary
public int getScale()
getSolidLoopsback to summary
public synchronized RenderLoops getSolidLoops(SurfaceType stype)

Return the RenderLoops this type of destination uses for solid fills and strokes.

getSurfaceDataProxyCacheback to summary
public SurfaceManager.ProxyCache getSurfaceDataProxyCache()

Implements sun.awt.image.SurfaceManager.ProxiedGraphicsConfig.getSurfaceDataProxyCache.

Doc from sun.awt.image.SurfaceManager.ProxiedGraphicsConfig.getSurfaceDataProxyCache.

Return the cache that destination surfaces created on the given GraphicsConfiguration use to store SurfaceDataProxy objects for their cached copies.

Annotations
@Override
getSurfaceTypeback to summary
public synchronized SurfaceType getSurfaceType()
getSwapActionback to summary
private static int getSwapAction(BufferCapabilities.FlipContents flipAction)

Maps the given FlipContents constant to the associated XDBE swap action constant.

getVisualback to summary
public int getVisual()

Returns the visual id associated with this configuration.

getXResolutionback to summary
private native double getXResolution(int screen)
getYResolutionback to summary
private native double getYResolution(int screen)
initback to summary
private native void init(int visualNum, int screen)
initIDsback to summary
private static native void initIDs()
isDoubleBufferedback to summary
public boolean isDoubleBuffered()
isTranslucencyCapableback to summary
public boolean isTranslucencyCapable()

Overrides java.awt.GraphicsConfiguration.isTranslucencyCapable.

Doc from java.awt.GraphicsConfiguration.isTranslucencyCapable.

Returns whether this GraphicsConfiguration supports the PERPIXEL_TRANSLUCENT kind of translucency.

Annotations
@Override
isTranslucencyCapableback to summary
private native boolean isTranslucencyCapable(long x11ConfigData)
makeColorModelback to summary
private native ColorModel makeColorModel()
scaleDownback to summary
public int scaleDown(int x)
scaleUpback to summary
public int scaleUp(int x)
swapBuffersback to summary
private native void swapBuffers(long window, int swapAction)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
sun.awt back to summary

private final Class X11GraphicsConfig.X11GCDisposerRecord

extends Object
implements DisposerRecord
Class Inheritance
All Implemented Interfaces
sun.java2d.DisposerRecord

Field Summary

Modifier and TypeField and Description
private long

Constructor Summary

AccessConstructor and Description
public
X11GCDisposerRecord(long x11CfgData)

Method Summary

Modifier and TypeMethod and Description
public synchronized void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

x11ConfigDataback to summary
private long x11ConfigData

Constructor Detail

X11GCDisposerRecordback to summary
public X11GCDisposerRecord(long x11CfgData)

Method Detail

disposeback to summary
public synchronized void dispose()

Implements sun.java2d.DisposerRecord.dispose.

Annotations
@Override
sun.awt back to summary

private final Class X11GraphicsConfig.XDBECapabilities

extends BufferCapabilities
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.awt.BufferCapabilities:
clonegetBackBufferCapabilitiesgetFlipContentsgetFrontBufferCapabilitiesisFullScreenRequiredisMultiBufferAvailableisPageFlipping

Constructor Detail

XDBECapabilitiesback to summary
public XDBECapabilities()