From 725e9acfcdd0e16a3533d097692a912383bae3fc Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 25 Aug 2015 23:07:34 +0200 Subject: 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 --- .../junit/jogl/demos/gl2/newt/TestGearsNEWT.java | 25 ++++------------------ 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'src/test/com/jogamp') 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); -- cgit v1.2.3