diff options
author | Sven Gothel <[email protected]> | 2015-09-15 12:23:27 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-09-15 12:23:27 +0200 |
commit | 60e906330feaac485dfea60734573703a3973e36 (patch) | |
tree | e62ac5493f992182672d6664bd54c2b968e22584 /src/test | |
parent | 9c23064a6df1e3ef66a715759ee801a80ef516bd (diff) |
Bug 1211: Refine NEWTDemoListener, JOGLNewtAppletBase
- NEWTDemoListener.createPointerIcons(..)
- Use Display instance
- Simplify PointerIcon creation using a list,
skipping all non-found resources.
- JOGLNewtAppletBase
- Bring back reparent action via key 'r'
- Drop redundant PointerIcon, using NEWTDemoListener
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java | 9 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/newt/parenting/NewtAWTReparentingKeyAdapter.java | 5 |
2 files changed, 3 insertions, 11 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java index 39e94effc..f08e9a282 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java @@ -33,7 +33,6 @@ import java.lang.reflect.InvocationTargetException; import com.jogamp.junit.util.JunitTracer; import com.jogamp.newt.Display; -import com.jogamp.newt.Display.PointerIcon; import com.jogamp.newt.NewtFactory; import com.jogamp.newt.Screen; import com.jogamp.newt.Window; @@ -182,13 +181,7 @@ public class TestGearsES2NEWT extends UITestCase { } }); - final PointerIcon[] pointerIcons = NEWTDemoListener.createPointerIcons(glWindow); - if( setPointerIcon ) { - glWindow.setPointerIcon(pointerIcons[0]); - System.err.println("Set PointerIcon: "+glWindow.getPointerIcon()); - } - - final NEWTDemoListener newtDemoListener = new NEWTDemoListener(glWindow, pointerIcons); + final NEWTDemoListener newtDemoListener = new NEWTDemoListener(glWindow); newtDemoListener.quitAdapterEnable(true); glWindow.addKeyListener(newtDemoListener); glWindow.addMouseListener(newtDemoListener); diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/NewtAWTReparentingKeyAdapter.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/NewtAWTReparentingKeyAdapter.java index 3bf13f063..4fdee82c3 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/NewtAWTReparentingKeyAdapter.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/NewtAWTReparentingKeyAdapter.java @@ -29,7 +29,6 @@ package com.jogamp.opengl.test.junit.newt.parenting; import java.awt.Frame; -import com.jogamp.common.util.InterruptSource; import com.jogamp.nativewindow.CapabilitiesImmutable; import com.jogamp.nativewindow.util.InsetsImmutable; import com.jogamp.newt.Window; @@ -64,7 +63,7 @@ public class NewtAWTReparentingKeyAdapter extends NEWTDemoListener { case KeyEvent.VK_R: e.setConsumed(true); quitAdapterOff(); - new InterruptSource.Thread() { + glWindow.invokeOnNewThread(null, false, new Runnable() { public void run() { final java.lang.Thread t = glWindow.setExclusiveContextThread(null); if(glWindow.getParent()==null) { @@ -95,7 +94,7 @@ public class NewtAWTReparentingKeyAdapter extends NEWTDemoListener { glWindow.requestFocus(); glWindow.setExclusiveContextThread(t); quitAdapterOn(); - } }.start(); + } } ); break; } } |