changeset 1318:1e240f8f9fc5

[mq]: rt22054
author leifs
date Mon, 18 Jun 2012 08:26:14 -0700
parents acd0852a0a8e
children 38a9585cb2db
files javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TextAreaBehavior.java
diffstat 1 files changed, 15 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TextAreaBehavior.java	Sat Jun 16 14:42:50 2012 +0100
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TextAreaBehavior.java	Mon Jun 18 08:26:14 2012 -0700
@@ -175,9 +175,19 @@
     @Override public void callAction(String name) {
         final TextArea textInputControl = getControl();
 
+        boolean done = false;
+
         if (textInputControl.isEditable()) {
 //            fnCaretAnim(false);
 //            setCaretOpacity(1.0);
+            done = true;
+            if ("InsertNewLine".equals(name)) insertNewLine();
+            else if ("InsertTab".equals(name)) insertTab();
+            else done = false;
+        }
+
+        if (!done) {
+            done = true;
             if ("LineStart".equals(name)) skin.lineStart(false, false);
             else if ("LineEnd".equals(name)) skin.lineEnd(false, false);
             else if ("SelectLineStart".equals(name)) skin.lineStart(true, false);
@@ -198,19 +208,13 @@
             else if ("NextPage".equals(name)) skin.nextPage(false);
             else if ("SelectPreviousPage".equals(name)) skin.previousPage(true);
             else if ("SelectNextPage".equals(name)) skin.nextPage(true);
-            else if ("InsertNewLine".equals(name)) insertNewLine();
-            else if ("InsertTab".equals(name)) insertTab();
-            else super.callAction(name);
+            else {
+                done = false;
+            }
+        }
 //            fnCaretAnim(true);
 
-        } else if ("Copy".equals(name)) {
-            // if the key event is for the "copy" action then we go ahead
-            // and execute it, but for all other key events which occur
-            // when not editable, we don't allow.
-            textInputControl.copy();
-        } else if (name.startsWith("Traverse")) {
-            // call super.callAction() for any focus traversal actions even if
-            // it's not editable
+        if (!done) {
             super.callAction(name);
         }
     }