Package com.jogamp.nativewindow.awt
Class AWTGraphicsConfiguration
java.lang.Object
com.jogamp.nativewindow.DefaultGraphicsConfiguration
com.jogamp.nativewindow.awt.AWTGraphicsConfiguration
- All Implemented Interfaces:
AbstractGraphicsConfiguration,VisualIDHolder,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 com.jogamp.nativewindow.VisualIDHolder
VisualIDHolder.VIDComparator, VisualIDHolder.VIDType -
Field Summary
Fields inherited from interface com.jogamp.nativewindow.VisualIDHolder
VID_UNDEFINED -
Constructor Summary
ConstructorsConstructorDescriptionAWTGraphicsConfiguration(AWTGraphicsScreen screen, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, GraphicsConfiguration config, AbstractGraphicsConfiguration encapsulated) -
Method Summary
Modifier and TypeMethodDescriptionclone()static AWTGraphicsConfigurationcreate(Component awtComp, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested) Deprecated.static AWTGraphicsConfigurationcreate(GraphicsConfiguration gc, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested) Method constructs a newAWTGraphicsConfigurationprimarily based on the givenGraphicsConfiguration.Return the AWTGraphicsConfiguration.In case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the nativeAbstractGraphicsConfiguration, otherwise this instance.voidsetChosenCapabilities(CapabilitiesImmutable capsChosen) static CapabilitiesImmutablesetupCapabilitiesRGBABits(CapabilitiesImmutable capabilitiesIn, GraphicsConfiguration gc) Sets up the Capabilities' RGBA size based on the given GraphicsConfiguration's ColorModel.toString()Methods inherited from class com.jogamp.nativewindow.DefaultGraphicsConfiguration
getChosenCapabilities, getRequestedCapabilities, getScreen, getVisualID, toHexString, toHexString
-
Constructor Details
-
AWTGraphicsConfiguration
public AWTGraphicsConfiguration(AWTGraphicsScreen screen, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, GraphicsConfiguration config, AbstractGraphicsConfiguration encapsulated)
-
-
Method Details
-
create
public static AWTGraphicsConfiguration create(Component awtComp, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested) Deprecated.Usecreate(GraphicsConfiguration, CapabilitiesImmutable, CapabilitiesImmutable)Method constructs a newAWTGraphicsConfigurationprimarily based on the givenComponent'sGraphicsConfiguration.- Parameters:
awtComp- theComponent, whichGraphicsConfigurationis used for the resultingAWTGraphicsConfigurationcapsChosen- if null,capsRequestedis copied and aligned with the graphicsCapabilitiesof the AWT Component to produce the chosenCapabilities. Otherwise thecapsChosenis used.capsRequested- if null, defaultCapabilitiesare used, otherwise the given values.
-
create
public static AWTGraphicsConfiguration create(GraphicsConfiguration gc, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested) Method constructs a newAWTGraphicsConfigurationprimarily based on the givenGraphicsConfiguration.- Parameters:
gc- theGraphicsConfigurationfor the resultingAWTGraphicsConfigurationcapsChosen- if null,capsRequestedis copied and aligned with the graphicsCapabilitiesof the AWT Component to produce the chosenCapabilities. Otherwise thecapsChosenis used.capsRequested- if null, defaultCapabilitiesare used, otherwise the given values.
-
setChosenCapabilities
-
clone
- Specified by:
clonein interfaceAbstractGraphicsConfiguration- Overrides:
clonein classDefaultGraphicsConfiguration
-
getAWTGraphicsConfiguration
Return the AWTGraphicsConfiguration. -
getNativeGraphicsConfiguration
Description copied from interface:AbstractGraphicsConfigurationIn case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the nativeAbstractGraphicsConfiguration, otherwise this instance.- Specified by:
getNativeGraphicsConfigurationin interfaceAbstractGraphicsConfiguration- Overrides:
getNativeGraphicsConfigurationin classDefaultGraphicsConfiguration- See Also:
-
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 setgc- the GraphicsConfiguration from which to derive the RGBA bit depths- Returns:
- the passed Capabilities
-
toString
- Overrides:
toStringin classDefaultGraphicsConfiguration
-
create(GraphicsConfiguration, CapabilitiesImmutable, CapabilitiesImmutable)Method constructs a newAWTGraphicsConfigurationprimarily based on the givenComponent'sGraphicsConfiguration.