summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/javax/media
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-11-10 01:13:16 +0100
committerSven Gothel <[email protected]>2011-11-10 01:13:16 +0100
commit44b86776d35668c12ccc698b92ae955bde8f250a (patch)
tree80946e83d2acd8b6bdcb32b00ce0e7b6356b7114 /src/nativewindow/classes/javax/media
parent0bdf9a9bb63a6e151acb5c58a0ab06a2644d4700 (diff)
NativeWindow minor edits: Remove warnings (generics, imports, ..)
Diffstat (limited to 'src/nativewindow/classes/javax/media')
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java17
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java19
2 files changed, 20 insertions, 16 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
index fa3923dcf..e510c0b78 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
@@ -60,9 +60,9 @@ import java.util.Map;
public abstract class GraphicsConfigurationFactory {
protected static final boolean DEBUG = Debug.debug("GraphicsConfiguration");
- private static Map/*<Class, NativeWindowFactory>*/ registeredFactories =
- Collections.synchronizedMap(new HashMap());
- private static Class abstractGraphicsDeviceClass;
+ private static Map<Class<?>, GraphicsConfigurationFactory> registeredFactories =
+ Collections.synchronizedMap(new HashMap<Class<?>, GraphicsConfigurationFactory>());
+ private static Class<?> abstractGraphicsDeviceClass;
static {
initialize();
@@ -122,7 +122,7 @@ public abstract class GraphicsConfigurationFactory {
*
* @throws IllegalArgumentException if the given class does not implement AbstractGraphicsDevice
*/
- public static GraphicsConfigurationFactory getFactory(Class abstractGraphicsDeviceImplementor)
+ public static GraphicsConfigurationFactory getFactory(Class<?> abstractGraphicsDeviceImplementor)
throws IllegalArgumentException, NativeWindowException
{
if (!(abstractGraphicsDeviceClass.isAssignableFrom(abstractGraphicsDeviceImplementor))) {
@@ -130,10 +130,9 @@ public abstract class GraphicsConfigurationFactory {
}
GraphicsConfigurationFactory factory = null;
- Class clazz = abstractGraphicsDeviceImplementor;
+ Class<?> clazz = abstractGraphicsDeviceImplementor;
while (clazz != null) {
- factory =
- (GraphicsConfigurationFactory) registeredFactories.get(clazz);
+ factory = registeredFactories.get(clazz);
if (factory != null) {
if(DEBUG) {
System.err.println("GraphicsConfigurationFactory.getFactory() "+abstractGraphicsDeviceImplementor+" -> "+factory);
@@ -143,7 +142,7 @@ public abstract class GraphicsConfigurationFactory {
clazz = clazz.getSuperclass();
}
// Return the default
- factory = (GraphicsConfigurationFactory)registeredFactories.get(abstractGraphicsDeviceClass);
+ factory = registeredFactories.get(abstractGraphicsDeviceClass);
if(DEBUG) {
System.err.println("GraphicsConfigurationFactory.getFactory() DEFAULT "+abstractGraphicsDeviceClass+" -> "+factory);
}
@@ -157,7 +156,7 @@ public abstract class GraphicsConfigurationFactory {
*
* @throws IllegalArgumentException if the given class does not implement AbstractGraphicsDevice
*/
- protected static void registerFactory(Class abstractGraphicsDeviceImplementor, GraphicsConfigurationFactory factory)
+ protected static void registerFactory(Class<?> abstractGraphicsDeviceImplementor, GraphicsConfigurationFactory factory)
throws IllegalArgumentException
{
if (!(abstractGraphicsDeviceClass.isAssignableFrom(abstractGraphicsDeviceImplementor))) {
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
index ef8876f50..60ce07f09 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
@@ -33,15 +33,20 @@
package javax.media.nativewindow;
-import java.security.*;
-import java.util.*;
-
-import com.jogamp.common.util.*;
-import com.jogamp.common.os.Platform;
-
-import jogamp.nativewindow.*;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import jogamp.nativewindow.Debug;
+import jogamp.nativewindow.NativeWindowFactoryImpl;
+
+import com.jogamp.common.os.Platform;
+import com.jogamp.common.util.ReflectionUtil;
/** Provides a pluggable mechanism for arbitrary window toolkits to
adapt their components to the {@link NativeWindow} interface,