diff options
author | Sven Gothel <[email protected]> | 2013-10-09 05:29:08 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-10-09 05:29:08 +0200 |
commit | 9997ce1f19accc2ef6b8568b5e3ba877710bef01 (patch) | |
tree | 9c4ca13d4217d61e5f9e8ab32865982ba3f9777e /src/test/com/jogamp/opengl | |
parent | 8be1fc983e584082b9960b4da19c56af5834d08e (diff) |
NewtCanvasAWT Focus Traversal: Remove AWT's requestFocus*() overrides in favor of FocusPropertyChangeListener requestFocusNEWTChild()
The AWT's requestFocus*() overrides were intended to receive the AWT focus (default) and
clear it afterwards to forward the focus to the NEWT component -> requestFocusNEWTChild().
This can be achieved simply by using our FocusPropertyChangeListener
and invoking requestFocusNEWTChild() when receiving the focus on the NewtCanvasAWT component.
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocusTraversal01AWT.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocusTraversal01AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocusTraversal01AWT.java index 693dd1448..ff540408a 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocusTraversal01AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocusTraversal01AWT.java @@ -249,7 +249,7 @@ public class TestParentingFocusTraversal01AWT extends UITestCase { Assert.assertEquals(true, glWindow1FA.focusLost()); Thread.sleep(durationPerTest/numFocus); - // direct AWT request focus + System.err.println("Test: Direct NewtCanvasAWT focus"); try { java.awt.EventQueue.invokeAndWait(new Runnable() { public void run() { @@ -262,7 +262,7 @@ public class TestParentingFocusTraversal01AWT extends UITestCase { Assert.assertEquals(true, bWestFA.focusLost()); Thread.sleep(durationPerTest/numFocus); - // direct AWT request focus + System.err.println("Test: Direct AWT Button-West focus"); try { java.awt.EventQueue.invokeAndWait(new Runnable() { public void run() { @@ -275,7 +275,7 @@ public class TestParentingFocusTraversal01AWT extends UITestCase { Assert.assertEquals(true, glWindow1FA.focusLost()); Thread.sleep(durationPerTest/numFocus); - // direct NEWT request focus + System.err.println("Test: Direct NEWT-Child request focus"); glWindow1.requestFocus(); Assert.assertTrue("Did not gain focus", AWTRobotUtil.waitForFocus(glWindow1, glWindow1FA, bWestFA)); Assert.assertEquals(true, glWindow1FA.focusGained()); |