aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-08-25 23:07:34 +0200
committerSven Gothel <[email protected]>2015-08-25 23:07:34 +0200
commit725e9acfcdd0e16a3533d097692a912383bae3fc (patch)
tree30ea6f233dd48be4ef66dbe4dbe7a6470056c718 /src/test/com
parent7ff3360ee2fc3d1e3742ffff2a8ba7000090c816 (diff)
Bug 1188: Fix API doc of getSupportedStateMask(); Misc Changes (see below)
- Fix STATE_MASK_CREATENATIVE - Simplify resetStateMask() - Windows WindowDriver: Remove STATE_MASK_STICKY from supported states - TestGearsNEWT: Use NEWTDemoListener
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java
index 0f3011c3d..17e50adc0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java
@@ -28,10 +28,9 @@
package com.jogamp.opengl.test.junit.jogl.demos.gl2.newt;
-import com.jogamp.newt.event.KeyAdapter;
-import com.jogamp.newt.event.KeyEvent;
import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.NEWTDemoListener;
import com.jogamp.opengl.test.junit.util.QuitAdapter;
import com.jogamp.opengl.util.Animator;
@@ -84,25 +83,9 @@ public class TestGearsNEWT extends UITestCase {
glWindow.addKeyListener(quitAdapter);
glWindow.addWindowListener(quitAdapter);
- final GLWindow f_glWindow = glWindow;
- glWindow.addKeyListener(new KeyAdapter() {
- public void keyReleased(final KeyEvent e) {
- if( !e.isPrintableKey() || e.isAutoRepeat() ) {
- return;
- }
- if(e.getKeyChar()=='f') {
- new Thread() {
- public void run() {
- f_glWindow.setFullscreen(!f_glWindow.isFullscreen());
- } }.start();
- } else if(e.getKeyChar()=='d') {
- new Thread() {
- public void run() {
- f_glWindow.setUndecorated(!f_glWindow.isUndecorated());
- } }.start();
- }
- }
- });
+ final NEWTDemoListener newtDemoListener = new NEWTDemoListener(glWindow);
+ glWindow.addKeyListener(newtDemoListener);
+ glWindow.addMouseListener(newtDemoListener);
glWindow.setSize(width, height);
glWindow.setVisible(true);