changeset 1104:fe2f0694b18e

Automated merge with file:///home/martin/Work/JavaFx/jfx-22-sync/rt
author Martin Sladecek <martin.sladecek@oracle.com>
date Tue, 22 May 2012 15:40:18 +0200
parents 908b36f4a14e 1e79d020fce6
children 28f01d4898b6
files
diffstat 4 files changed, 13 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/com/sun/javafx/scene/DirtyBits.java	Tue May 22 14:16:40 2012 +0200
+++ b/javafx-ui-common/src/com/sun/javafx/scene/DirtyBits.java	Tue May 22 15:40:18 2012 +0200
@@ -36,7 +36,6 @@
     NODE_TRANSFORM,
     NODE_BOUNDS,
     NODE_VISIBLE,
-    NODE_TREE_VISIBLE,
     NODE_DEPTH_TEST,
     NODE_BLENDMODE,
     NODE_CSS,
--- a/javafx-ui-common/src/javafx/scene/Node.java	Tue May 22 14:16:40 2012 +0200
+++ b/javafx-ui-common/src/javafx/scene/Node.java	Tue May 22 15:40:18 2012 +0200
@@ -355,7 +355,7 @@
                 s.addToDirtyList(this);
         }
 
-        dirtyBits |= dirtyBit.getMask();
+        impl_setDirty(dirtyBit);
     }
 
     /**
@@ -370,6 +370,17 @@
     }
 
     /**
+     * Set the specified dirty bit.
+     *
+     * @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 void impl_setDirty(DirtyBits dirtyBit) {
+        dirtyBits |= dirtyBit.getMask();
+    }
+
+    /**
      * Clear the specified dirty bit
      *
      * @treatAsPrivate implementation detail
@@ -503,10 +514,6 @@
                                   ? null
                                   : Blend.impl_getToolkitMode(mode));
         }
-
-        if (impl_isDirty(DirtyBits.NODE_TREE_VISIBLE) && !treeVisible) {
-            peer.dispose();
-        }
     }
 
     /*************************************************************************
@@ -702,7 +709,6 @@
                     if (getClip() != null) {
                         getClip().setScene(_scene);
                     }
-                    updateTreeVisible();
                     updateCanReceiveFocus();
                     if (isFocusTraversable()) {
                         if (oldScene != null) {
@@ -6439,8 +6445,7 @@
     }
 
     private void updateTreeVisible() {
-        setTreeVisible(isVisible() && ((getParent() != null && getParent().impl_isTreeVisible()) ||
-                (getScene() != null && getScene().getRoot() == this)));
+        setTreeVisible(isVisible() && ((getParent() == null) || getParent().impl_isTreeVisible()));
     }
 
     private boolean treeVisible;
@@ -6452,7 +6457,6 @@
             updateCanReceiveFocus();
             focusSetDirty(getScene());
             ((TreeVisiblePropertyReadOnly)treeVisibleProperty()).invalidate();
-            impl_markDirty(DirtyBits.NODE_TREE_VISIBLE);
         }
     }
 
--- a/javafx-ui-common/test/unit/javafx/scene/NodeTest.java	Tue May 22 14:16:40 2012 +0200
+++ b/javafx-ui-common/test/unit/javafx/scene/NodeTest.java	Tue May 22 15:40:18 2012 +0200
@@ -986,33 +986,4 @@
         assertEquals("", node.styleProperty().get());
         assertEquals("", node.getStyle());
     }
-
-    @Test
-    public void testNode_treeVisible() {
-        final Node n = new Rectangle();
-        Group g = new Group();
-        Scene s = new Scene(g);
-        assertTrue(g.impl_isTreeVisible());
-        assertFalse(n.impl_isTreeVisible());
-
-        g.getChildren().add(n);
-        assertTrue(n.impl_isTreeVisible());
-
-        g.getChildren().clear();
-        assertTrue(g.impl_isTreeVisible());
-        assertFalse(n.impl_isTreeVisible());
-
-        s.setRoot(new Group());
-        assertFalse(g.impl_isTreeVisible());
-
-        g.getChildren().add(n);
-        s.setRoot(g);
-        assertTrue(g.impl_isTreeVisible());
-        assertTrue(n.impl_isTreeVisible());
-
-        g.setVisible(false);
-        assertFalse(g.impl_isTreeVisible());
-        assertFalse(n.impl_isTreeVisible());
-    }
-
 }
--- a/test-stub-toolkit/src/com/sun/javafx/pgstub/StubNode.java	Tue May 22 14:16:40 2012 +0200
+++ b/test-stub-toolkit/src/com/sun/javafx/pgstub/StubNode.java	Tue May 22 15:40:18 2012 +0200
@@ -107,9 +107,4 @@
     public void effectChanged() {
         // ignore
     }
-
-    @Override
-    public void dispose() {
-        // ignore
-    }
 }