javax.media.nativewindow.awt
Class AWTGraphicsConfiguration

java.lang.Object
  extended by javax.media.nativewindow.DefaultGraphicsConfiguration
      extended by javax.media.nativewindow.awt.AWTGraphicsConfiguration
All Implemented Interfaces:
Cloneable, AbstractGraphicsConfiguration

public class AWTGraphicsConfiguration
extends DefaultGraphicsConfiguration
implements Cloneable

A wrapper for an AWT GraphicsConfiguration allowing it to be handled in a toolkit-independent manner.


Constructor Summary
AWTGraphicsConfiguration(AWTGraphicsScreen screen, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, GraphicsConfiguration config)
           
AWTGraphicsConfiguration(AWTGraphicsScreen screen, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, GraphicsConfiguration config, AbstractGraphicsConfiguration encapsulated)
           
 
Method Summary
 Object clone()
           
static AWTGraphicsConfiguration create(Component awtComp, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested)
           
 GraphicsConfiguration getGraphicsConfiguration()
           
 AbstractGraphicsConfiguration getNativeGraphicsConfiguration()
          In case this instance already reflects a native configuration, return this one.
static CapabilitiesImmutable setupCapabilitiesRGBABits(CapabilitiesImmutable capabilitiesIn, GraphicsConfiguration gc)
          Sets up the Capabilities' RGBA size based on the given GraphicsConfiguration's ColorModel.
 String toString()
           
 
Methods inherited from class javax.media.nativewindow.DefaultGraphicsConfiguration
getChosenCapabilities, getRequestedCapabilities, getScreen, toHexString, toHexString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AWTGraphicsConfiguration

public AWTGraphicsConfiguration(AWTGraphicsScreen screen,
                                CapabilitiesImmutable capsChosen,
                                CapabilitiesImmutable capsRequested,
                                GraphicsConfiguration config,
                                AbstractGraphicsConfiguration encapsulated)

AWTGraphicsConfiguration

public AWTGraphicsConfiguration(AWTGraphicsScreen screen,
                                CapabilitiesImmutable capsChosen,
                                CapabilitiesImmutable capsRequested,
                                GraphicsConfiguration config)
Method Detail

create

public static AWTGraphicsConfiguration create(Component awtComp,
                                              CapabilitiesImmutable capsChosen,
                                              CapabilitiesImmutable capsRequested)
Parameters:
capsChosen - if null, capsRequested is copied and aligned with the graphics capabilties of the AWT Component to produce the chosen Capabilties. Otherwise the capsChosen is used.

clone

public Object clone()
Overrides:
clone in class DefaultGraphicsConfiguration

getGraphicsConfiguration

public GraphicsConfiguration getGraphicsConfiguration()

getNativeGraphicsConfiguration

public AbstractGraphicsConfiguration getNativeGraphicsConfiguration()
Description copied from interface: AbstractGraphicsConfiguration
In case this instance already reflects a native configuration, return this one. Otherwise return the encapsuled native configuration, as it shall be included e.g. in the AWT case.

Specified by:
getNativeGraphicsConfiguration in interface AbstractGraphicsConfiguration
Overrides:
getNativeGraphicsConfiguration in class DefaultGraphicsConfiguration

setupCapabilitiesRGBABits

public static CapabilitiesImmutable setupCapabilitiesRGBABits(CapabilitiesImmutable capabilitiesIn,
                                                              GraphicsConfiguration gc)
Sets up the Capabilities' RGBA size based on the given GraphicsConfiguration's ColorModel.

Parameters:
capabilities - the Capabilities object whose red, green, blue, and alpha bits will be set
gc - the GraphicsConfiguration from which to derive the RGBA bit depths
Returns:
the passed Capabilities

toString

public String toString()
Overrides:
toString in class DefaultGraphicsConfiguration


Copyright 2010 JogAmp Community.