changeset 831:fbeddee20dba 2.2-b05

Backout changeset 9e5241252bf1 RT-21029: revert fix for RT-20634 (it caused a SceneBuilder regression)
author kcr
date Wed, 18 Apr 2012 12:56:59 -0700
parents bee66ffe3182
children 967fe750df8c 657944ba4017
files javafx-ui-common/src/javafx/scene/Scene.java javafx-ui-controls/test/com/sun/javafx/scene/control/skin/ScrollPaneSkinTest.java
diffstat 2 files changed, 43 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/javafx/scene/Scene.java	Tue Apr 17 08:57:53 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/Scene.java	Wed Apr 18 12:56:59 2012 -0700
@@ -1691,6 +1691,46 @@
     public Node impl_getFocusOwner() {
         return getKeyHandler().getFocusOwner();
     }
+    /**
+     * The scene's current focus owner node. This node's "focused"
+     * variable might be false if this scene has no window, or if the
+     * window is inactive (window.focused == false).
+     *
+     * @treatAsPrivate implementation detail
+     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+     */
+    @Deprecated
+    private ObjectProperty<Node> impl_focusOwner;
+
+    /**
+     * @treatAsPrivate implementation detail
+     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+     */
+    @Deprecated
+    public final void setImpl_focusOwner(Node value) {
+        impl_focusOwnerProperty().set(value);
+    }
+
+    /**
+     * @treatAsPrivate implementation detail
+     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+     */
+    @Deprecated
+    public final Node getImpl_focusOwner() {
+        return impl_focusOwner == null ? null : impl_focusOwner.get();
+    }
+
+    /**
+     * @treatAsPrivate implementation detail
+     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+     */
+    @Deprecated
+    public final ObjectProperty<Node> impl_focusOwnerProperty() {
+        if (impl_focusOwner == null) {
+            impl_focusOwner = new SimpleObjectProperty<Node>(this, "impl_focusOwner");
+        }
+        return impl_focusOwner;
+    }
 
     // For testing.
     void focusCleanup() {
@@ -3182,6 +3222,8 @@
             }
             focusOwner = value;
 
+            Scene.this.setImpl_focusOwner(focusOwner);// = Scene{ impl_focusOwner = bind keyHandler.focusOwner };
+
             if (focusOwner != null) {
                 ((Node.FocusedProperty) focusOwner.focusedProperty()).store(windowFocused);
                 if (focusOwner != oldFocusOwner) {
--- a/javafx-ui-controls/test/com/sun/javafx/scene/control/skin/ScrollPaneSkinTest.java	Tue Apr 17 08:57:53 2012 -0700
+++ b/javafx-ui-controls/test/com/sun/javafx/scene/control/skin/ScrollPaneSkinTest.java	Wed Apr 18 12:56:59 2012 -0700
@@ -390,7 +390,7 @@
         /*
         ** did it work?
         */
-        assertTrue(scene.impl_getFocusOwner() == scrollPane);
+        assertTrue(scene.getImpl_focusOwner() == scrollPane);
     }
 
     /*