changeset 1110:72bd9ac17500 2.2-b10

RT-21759: Embedded: Virtual keyboard is not enabled (pushed on behalf of Leif)
author kcr
date Wed, 23 May 2012 10:52:00 -0700
parents 969b2929178a
children 5b87369c84ae c555ea353dcf
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextInputControlSkin.java
diffstat 1 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextInputControlSkin.java	Tue May 22 13:42:47 2012 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextInputControlSkin.java	Wed May 23 10:52:00 2012 -0700
@@ -359,22 +359,22 @@
             selectionHandle1.setId("selection-handle-1");
             selectionHandle2.setId("selection-handle-2");
 
-//             textInput.focusedProperty().addListener(new InvalidationListener() {
-//                 @Override public void invalidated(Observable observable) {
-//                     if (useFXVK) {
-//                         if (textInput.isFocused()) {
-//                             FXVK.attach(textInput);
-//                         } else if (getScene() == null ||
-//                                    getScene().getWindow() == null ||
-//                                    !getScene().getWindow().isFocused() ||
-//                                    !(getScene().getFocusOwner() instanceof TextInputControl)) {
-//                             FXVK.detach();
-//                         }
-//                     }
-//                 }
-//             });
+            textInput.focusedProperty().addListener(new InvalidationListener() {
+                @Override public void invalidated(Observable observable) {
+                    if (useFXVK) {
+                        if (textInput.isFocused()) {
+                            FXVK.attach(textInput);
+                        } else if (getScene() == null ||
+                                   getScene().getWindow() == null ||
+                                   !getScene().getWindow().isFocused() ||
+                                   !(getScene().getFocusOwner() instanceof TextInputControl)) {
+                            FXVK.detach();
+                        }
+                    }
+                }
+            });
         }
-                    
+
         if (textInput.getOnInputMethodTextChanged() == null) {
             textInput.setOnInputMethodTextChanged(new EventHandler<InputMethodEvent>() {
                 @Override public void handle(InputMethodEvent event) {