summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2013-06-17 09:41:45 +0200
committerSven Gothel <sgothel@jausoft.com>2013-06-17 09:41:45 +0200
commit8b9eb4687d94426615e9de28b91af6a20a01f5b8 (patch)
tree51fa8bd99aaa2eb9b392beb88dc8b52d2049b673
parentaffa7c075773cbafdd815c81422bb280bccf6aac (diff)
Adapt to JOGL commit 8b33170ec6fd3f215976875cb66d746fa1b48f61, Fix Bug 688: Removal of NEWT KeyEvent.EVENT_KEY_TYPED and KeyListener.keyTyped(KeyEvent)
-rwxr-xr-xsrc/demos/GLNewtRun.java3
-rwxr-xr-xsrc/demos/es1/RedSquare.java5
-rwxr-xr-xsrc/demos/es2/RedSquare.java5
-rw-r--r--src/demos/newt/NEWTTest1.java3
-rw-r--r--src/demos/newt/TaskManagerTest1.java3
-rw-r--r--src/demos/newt/TaskManagerTest2.java3
-rw-r--r--src/jbullet/src/javabullet/demos/opengl/DemoApplication.java2
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) {
- }
//
//