summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-08-30 03:51:10 +0200
committerSven Gothel <[email protected]>2011-08-30 03:51:10 +0200
commit444eaa259116f7985711164512607ad46015fa4b (patch)
treea5e0e0b59b4a772786e617cc9c28b80cf82aaa29 /src/newt/classes/jogamp
parent9ed513e9a9616f6028084df4c650c8caf31ea49d (diff)
NEWT: Add comment in API doc ; Use more generics in impl.
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r--src/newt/classes/jogamp/newt/DisplayImpl.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java
index dc07bd180..4154059e2 100644
--- a/src/newt/classes/jogamp/newt/DisplayImpl.java
+++ b/src/newt/classes/jogamp/newt/DisplayImpl.java
@@ -51,10 +51,10 @@ public abstract class DisplayImpl extends Display {
private static int serialno = 1;
- private static Class getDisplayClass(String type)
+ private static Class<?> getDisplayClass(String type)
throws ClassNotFoundException
{
- Class displayClass = NewtFactory.getCustomClass(type, "Display");
+ Class<?> displayClass = NewtFactory.getCustomClass(type, "Display");
if(null==displayClass) {
if (NativeWindowFactory.TYPE_ANDROID.equals(type)) {
displayClass = Class.forName("jogamp.newt.driver.android.AndroidDisplay");
@@ -78,7 +78,7 @@ public abstract class DisplayImpl extends Display {
/** Make sure to reuse a Display with the same name */
public static Display create(String type, String name, final long handle, boolean reuse) {
try {
- Class displayClass = getDisplayClass(type);
+ Class<?> displayClass = getDisplayClass(type);
DisplayImpl display = (DisplayImpl) displayClass.newInstance();
name = display.validateDisplayName(name, handle);
synchronized(displayList) {
@@ -354,7 +354,7 @@ public abstract class DisplayImpl extends Display {
protected abstract void dispatchMessagesNative();
private Object eventsLock = new Object();
- private ArrayList/*<NEWTEvent>*/ events = new ArrayList();
+ private ArrayList<NEWTEventTask> events = new ArrayList<NEWTEventTask>();
private volatile boolean haveEvents = false;
class DispatchMessagesRunnable implements Runnable {
@@ -384,21 +384,21 @@ public abstract class DisplayImpl extends Display {
if(0==refCount) return; // no screens
if(null==getGraphicsDevice()) return; // no native device
- ArrayList/*<NEWTEvent>*/ _events = null;
+ ArrayList<NEWTEventTask> _events = null;
if(haveEvents) { // volatile: ok
synchronized(eventsLock) {
if(haveEvents) {
// swap events list to free ASAP
_events = events;
- events = new ArrayList();
+ events = new ArrayList<NEWTEventTask>();
haveEvents = false;
}
eventsLock.notifyAll();
}
if( null != _events ) {
for (int i=0; i < _events.size(); i++) {
- dispatchMessage((NEWTEventTask) _events.get(i));
+ dispatchMessage(_events.get(i));
}
}
}