You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2012/10/17 16:37:28 UTC
svn commit: r1399276 -
/pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java
Author: smartini
Date: Wed Oct 17 14:37:27 2012
New Revision: 1399276
URL: http://svn.apache.org/viewvc?rev=1399276&view=rev
Log:
PIVOT-876, patch applied
Modified:
pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java
Modified: pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java
URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java?rev=1399276&r1=1399275&r2=1399276&view=diff
==============================================================================
--- pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java (original)
+++ pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java Wed Oct 17 14:37:27 2012
@@ -159,6 +159,32 @@ public final class BrowserApplicationCon
// Disable focus traversal keys
setFocusTraversalKeysEnabled(false);
+ // Let pivot manage the focus inside the applet, where we have only one AWT component
+ setFocusTraversalPolicyProvider(true);
+ setFocusCycleRoot(true);
+ setFocusTraversalPolicy(new java.awt.FocusTraversalPolicy() {
+ @Override
+ public java.awt.Component getLastComponent(java.awt.Container aContainer) {
+ return null;
+ }
+ @Override
+ public java.awt.Component getFirstComponent(java.awt.Container aContainer) {
+ return null;
+ }
+ @Override
+ public java.awt.Component getDefaultComponent(java.awt.Container aContainer) {
+ return null;
+ }
+ @Override
+ public java.awt.Component getComponentBefore(java.awt.Container aContainer, java.awt.Component aComponent) {
+ return HostApplet.this.displayHost;
+ }
+ @Override
+ public java.awt.Component getComponentAfter(java.awt.Container aContainer, java.awt.Component aComponent) {
+ return HostApplet.this.displayHost;
+ }
+ });
+
// Clear the background
setBackground(null);