diff options
author | Sven Gothel <[email protected]> | 2008-06-28 14:30:26 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-04-19 00:55:57 +0200 |
commit | d2bcb236273092923b04fa0096918523f2a3c02a (patch) | |
tree | 4587b30a3e7825a66b7eda2329fbba691550433a | |
parent | 79b427ed284bf6edfc932b5ad19884d4fe0397eb (diff) |
3rd round cdcfp - compile clean.
Re-adding cdcfp:
com/sun/opengl/impl/glu/mipmap/*
com/sun/opengl/impl/GLPbufferImpl.java
Using 'BufferUtil.nativeOrder(ByteBuffer)'
to set up the native byte order.
'BufferUtil.nativeOrder' is now public.
GLDrawableFactory:
- removed 'hardcoded' awt attribute.
Cleanup NEWT's AWT wrapping implementation.
- NativeWindowFactory incooperates with the wrapping property.
Bugs on X11/NEWT/AWT:
- no events
- deadlock at shutdown
- deadlock if EGLDrawable with AWT get's locked
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1700 232f8b59-042b-4e1e-8c03-345bb8c30851
-rw-r--r-- | src/classes/com/sun/opengl/impl/GLReflection.java | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/classes/com/sun/opengl/impl/GLReflection.java b/src/classes/com/sun/opengl/impl/GLReflection.java index 94e004f..6898db8 100644 --- a/src/classes/com/sun/opengl/impl/GLReflection.java +++ b/src/classes/com/sun/opengl/impl/GLReflection.java @@ -89,7 +89,9 @@ public final class GLReflection { } public static final boolean instanceOf(Object obj, String clazzName) { - Class clazz = obj.getClass(); + return instanceOf(obj.getClass(), clazzName); + } + public static final boolean instanceOf(Class clazz, String clazzName) { do { if(clazz.getName().equals(clazzName)) { return true; @@ -100,15 +102,29 @@ public final class GLReflection { } public static final boolean implementationOf(Object obj, String faceName) { - Class[] clazzes = obj.getClass().getInterfaces(); - for(int i=clazzes.length-1; i>=0; i--) { - Class face = clazzes[i]; - if(face.getName().equals(faceName)) { - return true; + return implementationOf(obj.getClass(), faceName); + } + public static final boolean implementationOf(Class clazz, String faceName) { + do { + Class[] clazzes = clazz.getInterfaces(); + for(int i=clazzes.length-1; i>=0; i--) { + Class face = clazzes[i]; + if(face.getName().equals(faceName)) { + return true; + } } - } + clazz = clazz.getSuperclass(); + } while (clazz!=null); return false; } + public static boolean isAWTComponent(Object target) { + return instanceOf(target, "java.awt.Component"); + } + + public static boolean isAWTComponent(Class clazz) { + return instanceOf(clazz, "java.awt.Component"); + } + } |