javax.media.nativewindow
Class DefaultGraphicsConfiguration
java.lang.Object
javax.media.nativewindow.DefaultGraphicsConfiguration
- All Implemented Interfaces:
- Cloneable, AbstractGraphicsConfiguration, VisualIDHolder
- Direct Known Subclasses:
- AWTGraphicsConfiguration, MutableGraphicsConfiguration
public class DefaultGraphicsConfiguration
- extends Object
- implements Cloneable, AbstractGraphicsConfiguration
DefaultGraphicsConfiguration
public DefaultGraphicsConfiguration(AbstractGraphicsScreen screen,
CapabilitiesImmutable capsChosen,
CapabilitiesImmutable capsRequested)
clone
public Object clone()
- Overrides:
clone in class Object
getScreen
public final AbstractGraphicsScreen getScreen()
- Description copied from interface:
AbstractGraphicsConfiguration
- Return the screen this graphics configuration is valid for
- Specified by:
getScreen in interface AbstractGraphicsConfiguration
getChosenCapabilities
public final CapabilitiesImmutable getChosenCapabilities()
- Description copied from interface:
AbstractGraphicsConfiguration
- Return the capabilities reflecting this graphics configuration,
which may differ from the capabilities used to choose this configuration.
- Specified by:
getChosenCapabilities in interface AbstractGraphicsConfiguration
- Returns:
- An immutable instance of the Capabilities to avoid mutation by
the user.
getRequestedCapabilities
public final CapabilitiesImmutable getRequestedCapabilities()
- Description copied from interface:
AbstractGraphicsConfiguration
- Return the capabilities used to choose this graphics configuration.
These may be used to reconfigure the NativeWindow in case
the device changes in a multiple screen environment.
- Specified by:
getRequestedCapabilities in interface AbstractGraphicsConfiguration
- Returns:
- An immutable instance of the Capabilities to avoid mutation by
the user.
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
- See Also:
NativeSurface.getGraphicsConfiguration()
getVisualID
public final int getVisualID(VisualIDHolder.VIDType type)
throws NativeWindowException
- Description copied from interface:
VisualIDHolder
- Returns the native visual ID of the given
type
if supported, or VisualIDHolder.VID_UNDEFINED if not supported.
Depending on the native windowing system, type is handled as follows:
- X11 throws NativeWindowException on
EGL_CONFIG, WIN32_PFD
INTRINSIC: X11 XVisual ID
NATIVE: X11 XVisual ID
X11_XVISUAL: X11 XVisual ID
X11_FBCONFIG: VID_UNDEFINED
- X11/GL throws NativeWindowException on
EGL_CONFIG, WIN32_PFD
INTRINSIC: X11 XVisual ID
NATIVE: X11 XVisual ID
X11_XVISUAL: X11 XVisual ID
X11_FBCONFIG: X11 FBConfig ID or VID_UNDEFINED
- Windows/GL throws NativeWindowException on
EGL_CONFIG, X11_XVISUAL, X11_FBCONFIG
INTRINSIC: Win32 PIXELFORMATDESCRIPTOR ID
NATIVE: Win32 PIXELFORMATDESCRIPTOR ID
WIN32_PFD: Win32 PIXELFORMATDESCRIPTOR ID
- EGL/GL throws NativeWindowException on
X11_XVISUAL, X11_FBCONFIG, WIN32_PFD
INTRINSIC: EGL Config ID
NATIVE: EGL NativeVisual ID (X11 XVisual ID, Win32 PIXELFORMATDESCRIPTOR ID, ...)
EGL_CONFIG: EGL Config ID
Note: INTRINSIC and NATIVE are always handled,
but may result in VisualIDHolder.VID_UNDEFINED. The latter is true if
the native value are actually undefined or the corresponding object is not
mapped to a native visual object.
- Specified by:
getVisualID in interface VisualIDHolder
- Throws:
NativeWindowException - if type is neither
INTRINSIC nor NATIVE
and does not match the native implementation.
toString
public String toString()
- Overrides:
toString in class Object
toHexString
public static String toHexString(int val)
toHexString
public static String toHexString(long val)
Copyright 2010 JogAmp Community.