diff options
author | Sven Gothel <[email protected]> | 2012-03-26 21:06:29 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-03-26 21:06:29 +0200 |
commit | 7ef27943edd08dc02752b1eef6760c35877fc098 (patch) | |
tree | 2eb5cc36d832298d950906afca710df550dce936 /src | |
parent | 56434e48876a85e027bca5463afdc86929d025cf (diff) |
Adapt to gluegen commit e9e61421ef6009e6788998c471d1d3d30aaefea6
Diffstat (limited to 'src')
-rw-r--r-- | src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java | 6 | ||||
-rw-r--r-- | src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java index ca84901cb..b85ad47f2 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java +++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java @@ -92,7 +92,6 @@ public abstract class NativeWindowFactory { private static ToolkitLock jawtUtilJAWTToolkitLock; - public static final String AWTComponentClassName = "java.awt.Component" ; public static final String X11JAWTToolkitLockClassName = "jogamp.nativewindow.jawt.x11.X11JAWTToolkitLock" ; public static final String X11ToolkitLockClassName = "jogamp.nativewindow.x11.X11ToolkitLock" ; @@ -204,8 +203,7 @@ public abstract class NativeWindowFactory { } isAWTAvailable = false; // may be set to true below - if( !Debug.getBooleanProperty("java.awt.headless", true) && - ReflectionUtil.isClassAvailable(AWTComponentClassName, cl) && + if( Platform.AWT_AVAILABLE && ReflectionUtil.isClassAvailable("com.jogamp.nativewindow.awt.AWTGraphicsDevice", cl) ) { Method[] jawtUtilMethods = AccessController.doPrivileged(new PrivilegedAction<Method[]>() { @@ -264,7 +262,7 @@ public abstract class NativeWindowFactory { if ( isAWTAvailable ) { // register either our default factory or (if exist) the X11/AWT one -> AWT Component - registerFactory(ReflectionUtil.getClass(AWTComponentClassName, false, cl), factory); + registerFactory(ReflectionUtil.getClass(ReflectionUtil.AWTNames.ComponentClass, false, cl), factory); } if( TYPE_X11 == nativeWindowingTypePure ) { diff --git a/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java b/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java index 223078ebf..9e18439db 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java +++ b/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java @@ -41,6 +41,7 @@ import javax.media.nativewindow.ToolkitLock; import com.jogamp.common.os.Platform; import com.jogamp.common.util.ReflectionUtil; +import com.jogamp.common.util.ReflectionUtil.AWTNames; public class NativeWindowFactoryImpl extends NativeWindowFactory { private static final ToolkitLock nullToolkitLock = new NullToolkitLock(); @@ -61,13 +62,13 @@ public class NativeWindowFactoryImpl extends NativeWindowFactory { throw new IllegalArgumentException("AbstractGraphicsConfiguration is null with a non NativeWindow object"); } - if (NativeWindowFactory.isAWTAvailable() && ReflectionUtil.instanceOf(winObj, AWTComponentClassName)) { + if (NativeWindowFactory.isAWTAvailable() && ReflectionUtil.instanceOf(winObj, AWTNames.ComponentClass)) { return getAWTNativeWindow(winObj, config); } throw new IllegalArgumentException("Target window object type " + winObj.getClass().getName() + " is unsupported; expected " + - "javax.media.nativewindow.NativeWindow or "+AWTComponentClassName); + "javax.media.nativewindow.NativeWindow or "+AWTNames.ComponentClass); } private Constructor<?> nativeWindowConstructor = null; |