Top Description Fields Constructors Methods
com.jogamp.nativewindow.awt

public Class AWTGraphicsConfiguration

extends DefaultGraphicsConfiguration
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
com.jogamp.nativewindow.*, .AbstractGraphicsConfiguration, java.awt.Component, .GraphicsConfiguration, .GraphicsDevice, java.awt.image.ColorModel, jogamp.nativewindow.Debug

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

Field Summary

Modifier and TypeField and Description
private final GraphicsConfiguration
pack-priv AbstractGraphicsConfiguration
Inherited from com.jogamp.nativewindow.DefaultGraphicsConfiguration:
capabilitiesChosencapabilitiesRequestedDEBUG

Constructor Summary

AccessConstructor and Description
public
AWTGraphicsConfiguration(final AWTGraphicsScreen screen, final CapabilitiesImmutable capsChosen, final CapabilitiesImmutable capsRequested, final GraphicsConfiguration config, final AbstractGraphicsConfiguration encapsulated)

private
AWTGraphicsConfiguration(final AWTGraphicsScreen screen, final CapabilitiesImmutable capsChosen, final CapabilitiesImmutable capsRequested, final GraphicsConfiguration config)

Method Summary

Modifier and TypeMethod and Description
public Object
public static AWTGraphicsConfiguration
create(final Component
the Component, which GraphicsConfiguration is used for the resulting AWTGraphicsConfiguration
awtComp
,
final CapabilitiesImmutable
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.
capsChosen
,
final CapabilitiesImmutable
if null, default Capabilities are used, otherwise the given values.
capsRequested
)

public static AWTGraphicsConfiguration
create(final GraphicsConfiguration gc, CapabilitiesImmutable
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.
capsChosen
,
CapabilitiesImmutable
if null, default Capabilities are used, otherwise the given values.
capsRequested
)

Method constructs a new AWTGraphicsConfiguration primarily based on the given GraphicsConfiguration.

public GraphicsConfiguration
public AbstractGraphicsConfiguration
getNativeGraphicsConfiguration()

Overrides com.jogamp.nativewindow.DefaultGraphicsConfiguration.getNativeGraphicsConfiguration.

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.getNativeGraphicsConfiguration.

In case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the native AbstractGraphicsConfiguration, otherwise this instance.
public void
public static CapabilitiesImmutable

Returns:

the passed Capabilities
setupCapabilitiesRGBABits
(final CapabilitiesImmutable
the Capabilities object whose red, green, blue, and alpha bits will be set
capabilitiesIn
,
final GraphicsConfiguration
the GraphicsConfiguration from which to derive the RGBA bit depths
gc
)

Sets up the Capabilities' RGBA size based on the given GraphicsConfiguration's ColorModel.

public String
toString()

Overrides com.jogamp.nativewindow.DefaultGraphicsConfiguration.toString.

Returns a string representation of the object.
Inherited from com.jogamp.nativewindow.DefaultGraphicsConfiguration:
getChosenCapabilitiesgetRequestedCapabilitiesgetScreengetVisualIDsetScreentoHexStringtoHexString

Field Detail

configback to summary
private final GraphicsConfiguration config
encapsulatedback to summary
pack-priv AbstractGraphicsConfiguration encapsulated

Constructor Detail

AWTGraphicsConfigurationback to summary
public AWTGraphicsConfiguration(final AWTGraphicsScreen screen, final CapabilitiesImmutable capsChosen, final CapabilitiesImmutable capsRequested, final GraphicsConfiguration config, final AbstractGraphicsConfiguration encapsulated)
AWTGraphicsConfigurationback to summary
private AWTGraphicsConfiguration(final AWTGraphicsScreen screen, final CapabilitiesImmutable capsChosen, final CapabilitiesImmutable capsRequested, final GraphicsConfiguration config)

Method Detail

cloneback to summary
public Object clone()

Overrides com.jogamp.nativewindow.DefaultGraphicsConfiguration.clone.

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:Object

a clone of this instance.

Annotations
@Override
createback to summary
public static AWTGraphicsConfiguration create(final Component awtComp, final CapabilitiesImmutable capsChosen, final CapabilitiesImmutable capsRequested)
Parameters
awtComp:Component

the Component, which GraphicsConfiguration is used for the resulting AWTGraphicsConfiguration

capsChosen:CapabilitiesImmutable

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:CapabilitiesImmutable

if null, default Capabilities are used, otherwise the given values.

createback to summary
public static AWTGraphicsConfiguration create(final GraphicsConfiguration gc, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested)

Method constructs a new AWTGraphicsConfiguration primarily based on the given GraphicsConfiguration.

Parameters
gc:GraphicsConfiguration

the GraphicsConfiguration for the resulting AWTGraphicsConfiguration

capsChosen:CapabilitiesImmutable

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:CapabilitiesImmutable

if null, default Capabilities are used, otherwise the given values.

getAWTGraphicsConfigurationback to summary
public GraphicsConfiguration getAWTGraphicsConfiguration()

Return the AWT GraphicsConfiguration.

getNativeGraphicsConfigurationback to summary
public AbstractGraphicsConfiguration getNativeGraphicsConfiguration()

Overrides com.jogamp.nativewindow.DefaultGraphicsConfiguration.getNativeGraphicsConfiguration.

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.getNativeGraphicsConfiguration.

Doc from com.jogamp.nativewindow.AbstractGraphicsConfiguration.getNativeGraphicsConfiguration.

In case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the native AbstractGraphicsConfiguration, otherwise this instance.

Annotations
@Override
setChosenCapabilitiesback to summary
public void setChosenCapabilities(final CapabilitiesImmutable capsChosen)

Overrides com.jogamp.nativewindow.DefaultGraphicsConfiguration.setChosenCapabilities.

Doc from com.jogamp.nativewindow.DefaultGraphicsConfiguration.setChosenCapabilities.

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.

Annotations
@Override
setupCapabilitiesRGBABitsback to summary
public static CapabilitiesImmutable setupCapabilitiesRGBABits(final CapabilitiesImmutable capabilitiesIn, final GraphicsConfiguration gc)

Sets up the Capabilities' RGBA size based on the given GraphicsConfiguration's ColorModel.

Parameters
capabilitiesIn:CapabilitiesImmutable

the Capabilities object whose red, green, blue, and alpha bits will be set

gc:GraphicsConfiguration

the GraphicsConfiguration from which to derive the RGBA bit depths

Returns:CapabilitiesImmutable

the passed Capabilities

toStringback to summary
public String toString()

Overrides com.jogamp.nativewindow.DefaultGraphicsConfiguration.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override