|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.media.nativewindow.NativeWindowFactory
public abstract class NativeWindowFactory
Provides a pluggable mechanism for arbitrary window toolkits to
adapt their components to the NativeWindow
interface,
which provides a platform-independent mechanism of accessing the
information required to perform operations like
hardware-accelerated rendering using the OpenGL API.
Field Summary | |
---|---|
protected static boolean |
DEBUG
|
static String |
TYPE_AWT
Generic AWT type |
static String |
TYPE_DEFAULT
Generic DEFAULT type, where platform implementation don't care |
static String |
TYPE_EGL
OpenKODE/EGL type |
static String |
TYPE_MACOSX
Mac OS X type |
static String |
TYPE_WINDOWS
Microsoft Windows type |
static String |
TYPE_X11
X11 type |
Constructor Summary | |
---|---|
protected |
NativeWindowFactory()
Creates a new NativeWindowFactory instance. |
Method Summary | |
---|---|
static NativeWindowFactory |
getDefaultFactory()
Gets the default NativeWindowFactory. |
static NativeWindowFactory |
getFactory(Class windowClass)
Returns the appropriate NativeWindowFactory to handle window objects of the given type. |
static String |
getNativeOSName(boolean useCustom)
|
static NativeWindow |
getNativeWindow(Object winObj,
AbstractGraphicsConfiguration config)
Converts the given window object and it's AbstractGraphicsConfiguration into a
NativeWindow which can be operated upon by a custom
toolkit, e.g. |
protected abstract NativeWindow |
getNativeWindowImpl(Object winObj,
AbstractGraphicsConfiguration config)
Performs the conversion from a toolkit's window object to a NativeWindow. |
static String |
getNativeWindowType(boolean useCustom)
|
abstract ToolkitLock |
getToolkitLock()
Returns the object which provides support for synchronizing with the underlying window toolkit. |
protected static void |
registerFactory(Class windowClass,
NativeWindowFactory factory)
Registers a NativeWindowFactory handling window objects of the given class. |
static void |
setDefaultFactory(NativeWindowFactory factory)
Sets the default NativeWindowFactory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final boolean DEBUG
public static final String TYPE_EGL
public static final String TYPE_WINDOWS
public static final String TYPE_X11
public static final String TYPE_MACOSX
public static final String TYPE_AWT
public static final String TYPE_DEFAULT
Constructor Detail |
---|
protected NativeWindowFactory()
Method Detail |
---|
public static String getNativeOSName(boolean useCustom)
public static String getNativeWindowType(boolean useCustom)
public static void setDefaultFactory(NativeWindowFactory factory)
ToolkitLock
as argument. For this reason the concept of a
default NativeWindowFactory is introduced. The toolkit lock
provided via getToolkitLock
from this
default NativeWindowFactory will be used for synchronization
within the Java binding to OpenGL. By default, if the AWT is
available, the default toolkit will support the AWT.
public static NativeWindowFactory getDefaultFactory()
ToolkitLock
as argument. For this reason the concept of a
default NativeWindowFactory is introduced. The toolkit lock
provided via getToolkitLock
from this
default NativeWindowFactory will be used for synchronization
within the Java binding to OpenGL. By default, if the AWT is
available, the default toolkit will support the AWT.
public static NativeWindowFactory getFactory(Class windowClass) throws IllegalArgumentException
NativeWindow
, in which case the client has
already assumed the responsibility of creating a compatible
NativeWindow implementation, or it might be that of a toolkit
class like Component
.
IllegalArgumentException
protected static void registerFactory(Class windowClass, NativeWindowFactory factory)
public static NativeWindow getNativeWindow(Object winObj, AbstractGraphicsConfiguration config) throws IllegalArgumentException, NativeWindowException
AbstractGraphicsConfiguration
into a
NativeWindow
which can be operated upon by a custom
toolkit, e.g. javax.media.opengl.GLDrawableFactory
.GraphicsConfigurationFactory
to construct a proper AbstractGraphicsConfiguration
.
IllegalArgumentException
- if the given window object
could not be handled by any of the registered
NativeWindowFactory instances
NativeWindowException
GraphicsConfigurationFactory.chooseGraphicsConfiguration(Capabilities, CapabilitiesChooser, AbstractGraphicsScreen)
protected abstract NativeWindow getNativeWindowImpl(Object winObj, AbstractGraphicsConfiguration config) throws IllegalArgumentException
IllegalArgumentException
public abstract ToolkitLock getToolkitLock()
ToolkitLock
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |