changeset 1242:b14d29378d60

Virtual keyboard: disable VK for non-editable text controls.
author leifs
date Wed, 06 Jun 2012 13:44:06 -0700
parents 0cbd6a3c74bb
children c03a7b34ec86
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextInputControlSkin.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextInputControlSkin.java	Wed Jun 06 13:26:28 2012 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextInputControlSkin.java	Wed Jun 06 13:44:06 2012 -0700
@@ -363,12 +363,13 @@
             textInput.focusedProperty().addListener(new InvalidationListener() {
                 @Override public void invalidated(Observable observable) {
                     if (useFXVK) {
-                        if (textInput.isFocused()) {
+                        if (textInput.isEditable() && textInput.isFocused()) {
                             FXVK.attach(textInput);
                         } else if (getScene() == null ||
                                    getScene().getWindow() == null ||
                                    !getScene().getWindow().isFocused() ||
-                                   !(getScene().getFocusOwner() instanceof TextInputControl)) {
+                                   !(getScene().getFocusOwner() instanceof TextInputControl &&
+                                     ((TextInputControl)getScene().getFocusOwner()).isEditable())) {
                             FXVK.detach();
                         }
                     }