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 Object
clone()
static AWTGraphicsConfiguration
create(GraphicsConfiguration gc, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested)
Method constructs a newAWTGraphicsConfiguration
primarily based on the givenGraphicsConfiguration
.GraphicsConfiguration
getAWTGraphicsConfiguration()
Return the AWTGraphicsConfiguration
.AbstractGraphicsConfiguration
getNativeGraphicsConfiguration()
In case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the nativeAbstractGraphicsConfiguration
, otherwise this instance.void
setChosenCapabilities(CapabilitiesImmutable capsChosen)
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 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 newAWTGraphicsConfiguration
primarily based on the givenGraphicsConfiguration
.- Parameters:
gc
- theGraphicsConfiguration
for the resultingAWTGraphicsConfiguration
capsChosen
- if null,capsRequested
is copied and aligned with the graphicsCapabilities
of the AWT Component to produce the chosenCapabilities
. Otherwise thecapsChosen
is used.capsRequested
- if null, defaultCapabilities
are used, otherwise the given values.
-
setChosenCapabilities
public void setChosenCapabilities(CapabilitiesImmutable capsChosen)
-
clone
public Object clone()
- Specified by:
clone
in interfaceAbstractGraphicsConfiguration
- Overrides:
clone
in classDefaultGraphicsConfiguration
-
getAWTGraphicsConfiguration
public GraphicsConfiguration getAWTGraphicsConfiguration()
Return the AWTGraphicsConfiguration
.
-
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 nativeAbstractGraphicsConfiguration
, otherwise this instance.- Specified by:
getNativeGraphicsConfiguration
in interfaceAbstractGraphicsConfiguration
- Overrides:
getNativeGraphicsConfiguration
in 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:
toString
in classDefaultGraphicsConfiguration
-
-