From 8b9eb4687d94426615e9de28b91af6a20a01f5b8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 17 Jun 2013 09:41:45 +0200 Subject: Adapt to JOGL commit 8b33170ec6fd3f215976875cb66d746fa1b48f61, Fix Bug 688: Removal of NEWT KeyEvent.EVENT_KEY_TYPED and KeyListener.keyTyped(KeyEvent) --- src/demos/GLNewtRun.java | 3 --- src/demos/es1/RedSquare.java | 5 +++-- src/demos/es2/RedSquare.java | 5 +++-- src/demos/newt/NEWTTest1.java | 3 --- src/demos/newt/TaskManagerTest1.java | 3 --- src/demos/newt/TaskManagerTest2.java | 3 --- src/jbullet/src/javabullet/demos/opengl/DemoApplication.java | 2 -- 7 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/demos/GLNewtRun.java b/src/demos/GLNewtRun.java index d02657c..264d504 100755 --- a/src/demos/GLNewtRun.java +++ b/src/demos/GLNewtRun.java @@ -44,9 +44,6 @@ public class GLNewtRun extends WindowAdapter implements KeyListener, MouseListen public void keyReleased(KeyEvent e) { System.out.println(e); } - public void keyTyped(KeyEvent e) { - System.out.println(e); - } public void mouseClicked(MouseEvent e) { System.out.println(" mouseevent: "+e); diff --git a/src/demos/es1/RedSquare.java b/src/demos/es1/RedSquare.java index cce9b31..9160ad4 100755 --- a/src/demos/es1/RedSquare.java +++ b/src/demos/es1/RedSquare.java @@ -62,8 +62,9 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo } public void keyReleased(KeyEvent e) { System.out.println("KEY-RELEASED "+Thread.currentThread()+" UNHANDLED "+e); - } - public void keyTyped(KeyEvent e) { + if( !e.isPrintableKey() || e.isAutoRepeat() ) { + return; + } if(e.getKeyChar()=='f') { System.out.println("KEY-TYPED "+Thread.currentThread()+" FULLSCREEN "+e); window.setFullscreen(!window.isFullscreen()); diff --git a/src/demos/es2/RedSquare.java b/src/demos/es2/RedSquare.java index 1269342..21e78cf 100755 --- a/src/demos/es2/RedSquare.java +++ b/src/demos/es2/RedSquare.java @@ -49,8 +49,9 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo } public void keyReleased(KeyEvent e) { System.out.println("KEY-RELEASED "+Thread.currentThread()+" UNHANDLED "+e); - } - public void keyTyped(KeyEvent e) { + if( !e.isPrintableKey() || e.isAutoRepeat() ) { + return; + } if(e.getKeyChar()=='f') { System.out.println("KEY-TYPED "+Thread.currentThread()+" FULLSCREEN "+e); window.setFullscreen(!window.isFullscreen()); diff --git a/src/demos/newt/NEWTTest1.java b/src/demos/newt/NEWTTest1.java index 3bcd260..e28ec5a 100644 --- a/src/demos/newt/NEWTTest1.java +++ b/src/demos/newt/NEWTTest1.java @@ -48,9 +48,6 @@ public class NEWTTest1 implements WindowListener, KeyListener, MouseListener public void keyReleased(KeyEvent e) { System.err.println("keyReleased "+e); } - public void keyTyped(KeyEvent e) { - System.err.println("keyTyped "+e); - } public void mouseClicked(MouseEvent e) { System.err.println("mouseClicked "+e); } diff --git a/src/demos/newt/TaskManagerTest1.java b/src/demos/newt/TaskManagerTest1.java index cc71f63..2f9f432 100644 --- a/src/demos/newt/TaskManagerTest1.java +++ b/src/demos/newt/TaskManagerTest1.java @@ -60,9 +60,6 @@ public class TaskManagerTest1 implements WindowListener, KeyListener, MouseList public void keyReleased(KeyEvent e) { System.err.println("keyReleased "+e); } - public void keyTyped(KeyEvent e) { - System.err.println("keyTyped "+e); - } public void mouseClicked(MouseEvent e) { System.err.println("mouseClicked "+e); } diff --git a/src/demos/newt/TaskManagerTest2.java b/src/demos/newt/TaskManagerTest2.java index 19a01e3..125a282 100644 --- a/src/demos/newt/TaskManagerTest2.java +++ b/src/demos/newt/TaskManagerTest2.java @@ -48,9 +48,6 @@ public class TaskManagerTest2 implements WindowListener, KeyListener, MouseList public void keyReleased(KeyEvent e) { System.err.println("keyReleased "+e); } - public void keyTyped(KeyEvent e) { - System.err.println("keyTyped "+e); - } public void mouseClicked(MouseEvent e) { System.err.println("mouseClicked "+e); } diff --git a/src/jbullet/src/javabullet/demos/opengl/DemoApplication.java b/src/jbullet/src/javabullet/demos/opengl/DemoApplication.java index 4b7352c..ff1a417 100644 --- a/src/jbullet/src/javabullet/demos/opengl/DemoApplication.java +++ b/src/jbullet/src/javabullet/demos/opengl/DemoApplication.java @@ -292,8 +292,6 @@ public abstract class DemoApplication keyboardCallback(e.getKeyChar()); } } - public void keyTyped(KeyEvent e) { - } // // -- cgit v1.2.3