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
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 com.jogamp.nativewindow.VisualIDHolder
VisualIDHolder.VIDComparator, VisualIDHolder.VIDType
-
-
Field Summary
-
Fields inherited from interface com.jogamp.nativewindow.VisualIDHolder
VID_UNDEFINED
-
-
Constructor Summary
Constructors Constructor Description AWTGraphicsConfiguration(AWTGraphicsScreen screen, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, GraphicsConfiguration config, AbstractGraphicsConfiguration encapsulated)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()static AWTGraphicsConfigurationcreate(GraphicsConfiguration gc, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested)Method constructs a newAWTGraphicsConfigurationprimarily based on the givenGraphicsConfiguration.GraphicsConfigurationgetAWTGraphicsConfiguration()Return the AWTGraphicsConfiguration.AbstractGraphicsConfigurationgetNativeGraphicsConfiguration()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.StringtoString()-
Methods inherited from class com.jogamp.nativewindow.DefaultGraphicsConfiguration
getChosenCapabilities, getRequestedCapabilities, getScreen, getVisualID, isVisualIDSupported, toHexString, toHexString
-
-
-
-
Constructor Detail
-
AWTGraphicsConfiguration
public AWTGraphicsConfiguration(AWTGraphicsScreen screen, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, GraphicsConfiguration config, AbstractGraphicsConfiguration encapsulated)
-
-
Method Detail
-
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
public void setChosenCapabilities(CapabilitiesImmutable capsChosen)
-
clone
public Object clone()
- Specified by:
clonein interfaceAbstractGraphicsConfiguration- Overrides:
clonein classDefaultGraphicsConfiguration
-
getAWTGraphicsConfiguration
public GraphicsConfiguration getAWTGraphicsConfiguration()
Return the AWTGraphicsConfiguration.
-
getNativeGraphicsConfiguration
public AbstractGraphicsConfiguration 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:
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 setgc- the GraphicsConfiguration from which to derive the RGBA bit depths- Returns:
- the passed Capabilities
-
toString
public String toString()
- Overrides:
toStringin classDefaultGraphicsConfiguration
-
-