changeset 730:474801a028b9 2.2-b03

RT-20648: removed impl_syncPGNodeDirect().
author Pavel Safrata
date Fri, 30 Mar 2012 10:06:31 +0200
parents 0616970d62e6
children cebb10de0795 1ba55d2ecc03 94e9b5588ae7
files javafx-ui-common/src/javafx/scene/Node.java javafx-ui-common/test/unit/javafx/scene/Parent_structure_sync_Test.java
diffstat 2 files changed, 10 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/javafx/scene/Node.java	Thu Mar 29 18:28:53 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/Node.java	Fri Mar 30 10:06:31 2012 +0200
@@ -419,31 +419,6 @@
      *************************************************************************/
 
     /**
-     * Called only by Text to update the state and clear dirtybits in the PG graph
-     * TODO: This must be removed as soon as RT-13735 is complete, since
-     * TextHelper should work with a PG node directly or some other means rather
-     * than using this method.
-     *
-     * @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 void impl_syncPGNodeDirect() {
-        if (!impl_isDirtyEmpty()) {
-            // Workaround for Don't RT-7446 update the state controlled by
-            // NODE_TRANSFORM.
-            boolean nodeTxDirty = impl_isDirty(DirtyBits.NODE_TRANSFORM);
-            impl_clearDirty(DirtyBits.NODE_TRANSFORM);
-            boolean boundsDirty = impl_isDirty(DirtyBits.NODE_BOUNDS);
-            impl_clearDirty(DirtyBits.NODE_BOUNDS);
-            impl_updatePG();
-            clearDirty();
-            if (nodeTxDirty) impl_setDirty(DirtyBits.NODE_TRANSFORM);
-            if (boundsDirty) impl_setDirty(DirtyBits.NODE_BOUNDS);
-        }
-    }
-
-    /**
      * Called by the synchronizer to update the state and
      * clear dirtybits of this node in the PG graph
      *
--- a/javafx-ui-common/test/unit/javafx/scene/Parent_structure_sync_Test.java	Thu Mar 29 18:28:53 2012 -0700
+++ b/javafx-ui-common/test/unit/javafx/scene/Parent_structure_sync_Test.java	Fri Mar 30 10:06:31 2012 +0200
@@ -24,6 +24,7 @@
  */
 package javafx.scene;
 
+import com.sun.javafx.pgstub.StubToolkit;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
@@ -33,6 +34,8 @@
 import org.junit.Test;
 
 import com.sun.javafx.sg.PGGroup;
+import com.sun.javafx.tk.Toolkit;
+import javafx.stage.Stage;
 
 /**
  * Tests to make sure the synchronization of children between a Parent and PGGroup
@@ -51,11 +54,17 @@
         r4 = new Rectangle(0, 0, 10, 10);
         r5 = new Rectangle(0, 0, 10, 10);
         pg = (PGGroup) parent.impl_getPGNode();
+
+        Scene scene = new Scene(parent);
+        Stage stage = new Stage();
+        stage.setScene(scene);
+        stage.show();
+
         sync();
     }
     
     private void sync() {
-        parent.impl_syncPGNodeDirect();
+        ((StubToolkit) Toolkit.getToolkit()).firePulse();
     }
     
     @Test public void emptyParentShouldHaveEmptyPGGroup() {