com.jogamp.nativewindow.awt

## Class AWTGraphicsConfiguration

- java.lang.Object
- - javax.media.nativewindow.DefaultGraphicsConfiguration
  - - com.jogamp.nativewindow.awt.AWTGraphicsConfiguration

- All Implemented Interfaces:
    Cloneable, AbstractGraphicsConfiguration, VisualIDHolder

      public class AWTGraphicsConfiguration
      extends DefaultGraphicsConfiguration
      implements Cloneable

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

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface javax.media.nativewindow.VisualIDHolder

      `VisualIDHolder.VIDComparator, VisualIDHolder.VIDType`

  - ### Field Summary

    - ### Fields inherited from interface javax.media.nativewindow.VisualIDHolder

      `VID_UNDEFINED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AWTGraphicsConfiguration(AWTGraphicsScreen screen, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, GraphicsConfiguration config, AbstractGraphicsConfiguration encapsulated)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `clone()`
    `static AWTGraphicsConfiguration` | `create(Component awtComp, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested)`
    `GraphicsConfiguration` | `getAWTGraphicsConfiguration()` Return the AWT `GraphicsConfiguration`.
    `AbstractGraphicsConfiguration` | `getNativeGraphicsConfiguration()` In case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the native `AbstractGraphicsConfiguration`, otherwise this instance.
    `void` | `setChosenCapabilities(CapabilitiesImmutable capsChosen)` Set the capabilities to a new value.
    `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, getVisualID, 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)

  - ### 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 `Capabilities` of the AWT Component to produce the chosen `Capabilities`. Otherwise the `capsChosen` is used.
        `capsRequested` - if null, default `Capabilities` are used, otherwise the given values.

    - #### setChosenCapabilities

          public void setChosenCapabilities(CapabilitiesImmutable capsChosen)

      Description copied from class: `DefaultGraphicsConfiguration`
      Set the capabilities to a new value.

      The use case for setting the Capabilities at a later time is a change or re-validation of capabilities.

      See Also:
        `javax.media.nativewindow.GraphicsConfigurationFactory#chooseGraphicsConfiguration(Capabilities, CapabilitiesChooser, AbstractGraphicsScreen)`

    - #### clone

          public Object clone()

      Specified by:
        `clone` in interface `AbstractGraphicsConfiguration`
      Overrides:
        `clone` in class `DefaultGraphicsConfiguration`

    - #### getAWTGraphicsConfiguration

          public GraphicsConfiguration getAWTGraphicsConfiguration()

      Return the AWT `GraphicsConfiguration`.

    - #### getNativeGraphicsConfiguration

          public AbstractGraphicsConfiguration getNativeGraphicsConfiguration()

      Description copied from interface: `AbstractGraphicsConfiguration`
      In case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the native `AbstractGraphicsConfiguration`, otherwise this instance.
      Specified by:
        `getNativeGraphicsConfiguration` in interface `AbstractGraphicsConfiguration`
      Overrides:
        `getNativeGraphicsConfiguration` in class `DefaultGraphicsConfiguration`
      See Also:
        `NativeSurface.getGraphicsConfiguration()`

    - #### 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.