changeset 4672:69df1cdfa87f

7122246: [macosx] JCK swing test CaretTests fails in b205 Reviewed-by: swingler
author alexp
date Mon, 23 Jan 2012 18:03:21 +0400
parents 4471ea791dc8
children 831af87f8b99
files src/macosx/classes/com/apple/laf/AquaCaret.java
diffstat 1 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/classes/com/apple/laf/AquaCaret.java	Mon Jan 23 17:56:06 2012 +0400
+++ b/src/macosx/classes/com/apple/laf/AquaCaret.java	Mon Jan 23 18:03:21 2012 +0400
@@ -60,15 +60,6 @@
         super.setVisible(e);
     }
 
-    public void setSelectionVisible(final boolean vis) {
-        if (isMultiLineEditor) {
-            super.setSelectionVisible(true);
-            c.repaint();
-            return;
-        }
-        super.setSelectionVisible(vis);
-    }
-
     protected void fireStateChanged() {
         // If we have focus the caret should only flash if the range length is zero
         if (mFocused) setVisible(getComponent().isEditable());
@@ -133,7 +124,12 @@
     public void focusLost(final FocusEvent e) {
         mFocused = false;
         shouldSelectAllOnFocus = true;
-        super.focusLost(e);
+        if (isMultiLineEditor) {
+            setVisible(false);
+            c.repaint();
+        } else {
+            super.focusLost(e);
+        }
     }
 
     // This fixes the problem where when on the mac you have to ctrl left click to