aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/javax/media/opengl/NativeWindowFactory.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-06-25 11:23:13 +0000
committerSven Gothel <[email protected]>2008-06-25 11:23:13 +0000
commit6a27950bbbb70018b44dc9e3be16d933c3c2999d (patch)
tree70cb9cd619d604ac749276d48ff9ae6f226e9402 /src/classes/javax/media/opengl/NativeWindowFactory.java
parent6e9438e631b9f75340c1f7e7cf06b38a358861c4 (diff)
Auto GL profile selection; New GLReflection (refactoring of common relfections); Fixes
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1684 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/javax/media/opengl/NativeWindowFactory.java')
-rw-r--r--src/classes/javax/media/opengl/NativeWindowFactory.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/classes/javax/media/opengl/NativeWindowFactory.java b/src/classes/javax/media/opengl/NativeWindowFactory.java
index 9bbfe7aac..006cb03ba 100644
--- a/src/classes/javax/media/opengl/NativeWindowFactory.java
+++ b/src/classes/javax/media/opengl/NativeWindowFactory.java
@@ -53,7 +53,6 @@ public class NativeWindowFactory {
try {
String osName = System.getProperty("os.name");
String osNameLowerCase = osName.toLowerCase();
- Class factoryClass = null;
String factoryClassName = null;
// Because there are some complications with generating all
@@ -74,15 +73,8 @@ public class NativeWindowFactory {
if (factoryClassName == null) {
throw new GLException("OS " + osName + " not yet supported");
}
- factoryClass = Class.forName(factoryClassName);
- if (factoryClass == null) {
- throw new GLException("Factory " + factoryClassName + " not yet implemented");
- }
-
- try {
- awtFactory = factoryClass.getDeclaredConstructor(new Class[] { Object.class });
- } catch(NoSuchMethodException nsme) {}
+ awtFactory = GLReflection.getConstructor(factoryClassName, new Class[] { Object.class });
} catch (Exception e) {
throw new GLException(e);
}
@@ -95,7 +87,7 @@ public class NativeWindowFactory {
* hence the independency to the java.awt.* package.
*/
public static boolean isAWTComponent(Object target) {
- return GLProfile.instanceOf(target, "java.awt.Component");
+ return GLReflection.instanceOf(target, "java.awt.Component");
}
/**