diff options
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r-- | src/nativewindow/classes/com/jogamp/nativewindow/impl/NativeWindowFactoryImpl.java | 4 | ||||
-rw-r--r-- | src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/impl/NativeWindowFactoryImpl.java b/src/nativewindow/classes/com/jogamp/nativewindow/impl/NativeWindowFactoryImpl.java index d2429cdab..6233bf533 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/impl/NativeWindowFactoryImpl.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/impl/NativeWindowFactoryImpl.java @@ -56,13 +56,13 @@ public class NativeWindowFactoryImpl extends NativeWindowFactory { throw new IllegalArgumentException("AbstractGraphicsConfiguration is null with a non NativeWindow object"); } - if (ReflectionUtil.instanceOf(winObj, "java.awt.Component")) { + if (ReflectionUtil.instanceOf(winObj, AWTComponentClassName)) { return getAWTNativeWindow(winObj, config); } throw new IllegalArgumentException("Target window object type " + winObj.getClass().getName() + " is unsupported; expected " + - "javax.media.nativewindow.NativeWindow or java.awt.Component"); + "javax.media.nativewindow.NativeWindow or "+AWTComponentClassName); } private Constructor nativeWindowConstructor = null; diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java index 2125fb4c0..14cb830e3 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java +++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java @@ -75,7 +75,7 @@ public abstract class NativeWindowFactory { private static String nativeWindowingTypeCustom; private static String nativeOSNameCustom; private static final boolean isAWTAvailable; - private static final String awtComponentClassName = "java.awt.Component" ; + public static final String AWTComponentClassName = "java.awt.Component" ; /** Creates a new NativeWindowFactory instance. End users do not need to call this method. */ @@ -126,7 +126,7 @@ public abstract class NativeWindowFactory { // make it easier to run this code on mobile devices isAWTAvailable = !Debug.getBooleanProperty("java.awt.headless", true, acc) && - ReflectionUtil.isClassAvailable(awtComponentClassName) && + ReflectionUtil.isClassAvailable(AWTComponentClassName) && ReflectionUtil.isClassAvailable("javax.media.nativewindow.awt.AWTGraphicsDevice") ; boolean toolkitLockForced = Debug.getBooleanProperty("nativewindow.locking", true, acc); @@ -195,7 +195,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), factory); + registerFactory(ReflectionUtil.getClass(AWTComponentClassName, false), factory); } defaultFactory = factory; |