changeset 7912:e43736c57ec8

[SCENEBUILDER] Some preparatory work to ease migration to SubScene. AbstractDecoration.getSceneGraphToSceneTransform() is now replaced by AbstractDecoration.getSceneGraphObjectProxy().
author eric.le.ponner <eric.le.ponner@oracle.com>
date Thu, 04 Sep 2014 18:29:31 +0200
parents 7f04dcd38b16
children 3f25a032f503
files apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/AbstractDecoration.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/gridpane/GridPanePring.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/AbstractCurveHandles.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/AbstractNodeHandles.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TabHandles.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TableColumnHandles.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TreeTableColumnHandles.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/outline/NodeOutline.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/NodePring.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TabPring.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TableColumnPring.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TreeTableColumnPring.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/rudder/ResizeRudder.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/AbstractNodeTring.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TabTring.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TableColumnTring.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TreeTableColumnTring.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/mode/HitNodeChrome.java
diffstat 18 files changed, 42 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/AbstractDecoration.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/AbstractDecoration.java	Thu Sep 04 18:29:31 2014 +0200
@@ -136,7 +136,8 @@
     }
     
     public Transform getSceneGraphObjectToDecorationTransform() {
-        final Transform t1 = getSceneGraphToSceneTransform();
+        final Node proxy = getSceneGraphObjectProxy();
+        final Transform t1 = proxy.getLocalToSceneTransform();
         final Transform t2 = getRootNode().getLocalToSceneTransform();
         final Transform result;
         
@@ -151,7 +152,7 @@
     }
     
     public abstract Bounds getSceneGraphObjectBounds();
-    public abstract Transform getSceneGraphToSceneTransform();
+    public abstract Node getSceneGraphObjectProxy();
     protected abstract void startListeningToSceneGraphObject();
     protected abstract void stopListeningToSceneGraphObject();
     protected abstract void layoutDecoration();
@@ -162,8 +163,8 @@
      */
     
     public Point2D sceneGraphObjectToDecoration(double x, double y) {
-        final Transform t = getSceneGraphToSceneTransform();
-        return getRootNode().sceneToLocal(t.transform(x, y));
+        final Node proxy = getSceneGraphObjectProxy();
+        return getRootNode().sceneToLocal(proxy.localToScene(x, y, true /* rootScene */));
     }
             
     protected void startListeningToLayoutBounds(Node node) {
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/gridpane/GridPanePring.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/gridpane/GridPanePring.java	Thu Sep 04 18:29:31 2014 +0200
@@ -43,7 +43,6 @@
 import javafx.scene.layout.GridPane;
 import javafx.scene.paint.Color;
 import javafx.scene.paint.Paint;
-import javafx.scene.transform.Transform;
 
 /**
  *
@@ -75,8 +74,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return getSceneGraphObject().getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return getSceneGraphObject();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/AbstractCurveHandles.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/AbstractCurveHandles.java	Thu Sep 04 18:29:31 2014 +0200
@@ -64,8 +64,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return getSceneGraphObject().getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return getSceneGraphObject();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/AbstractNodeHandles.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/AbstractNodeHandles.java	Thu Sep 04 18:29:31 2014 +0200
@@ -35,7 +35,6 @@
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
 import javafx.geometry.Bounds;
 import javafx.scene.Node;
-import javafx.scene.transform.Transform;
 
 /**
  *
@@ -61,8 +60,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return getSceneGraphObject().getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return getSceneGraphObject();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TabHandles.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TabHandles.java	Thu Sep 04 18:29:31 2014 +0200
@@ -37,7 +37,6 @@
 import javafx.scene.Node;
 import javafx.scene.control.Tab;
 import javafx.scene.control.TabPane;
-import javafx.scene.transform.Transform;
 
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.AbstractResilientHandles;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.ContentPanelController;
@@ -103,11 +102,11 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
+    public Node getSceneGraphObjectProxy() {
         assert isReady();
         assert tabPane != null;
         
-        return tabPane.getLocalToSceneTransform();
+        return tabPane;
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TableColumnHandles.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TableColumnHandles.java	Thu Sep 04 18:29:31 2014 +0200
@@ -43,7 +43,6 @@
 import javafx.scene.control.TableView;
 import javafx.scene.paint.Color;
 import javafx.scene.shape.Line;
-import javafx.scene.transform.Transform;
 
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.AbstractResilientHandles;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.ContentPanelController;
@@ -110,10 +109,10 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
+    public Node getSceneGraphObjectProxy() {
         assert isReady();
         assert tableView != null;
-        return tableView.getLocalToSceneTransform();
+        return tableView;
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TreeTableColumnHandles.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TreeTableColumnHandles.java	Thu Sep 04 18:29:31 2014 +0200
@@ -110,10 +110,9 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        assert isReady();
+    public Node getSceneGraphObjectProxy() {
         assert treeTableView != null;
-        return treeTableView.getLocalToSceneTransform();
+        return treeTableView;
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/outline/NodeOutline.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/outline/NodeOutline.java	Thu Sep 04 18:29:31 2014 +0200
@@ -36,7 +36,6 @@
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
 import javafx.geometry.Bounds;
 import javafx.scene.Node;
-import javafx.scene.transform.Transform;
 
 /**
  *
@@ -59,8 +58,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return getSceneGraphObject().getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return getSceneGraphObject();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/NodePring.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/NodePring.java	Thu Sep 04 18:29:31 2014 +0200
@@ -37,7 +37,6 @@
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
 import javafx.geometry.Bounds;
 import javafx.scene.Node;
-import javafx.scene.transform.Transform;
 
 /**
  *
@@ -64,8 +63,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return getSceneGraphObject().getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return getSceneGraphObject();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TabPring.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TabPring.java	Thu Sep 04 18:29:31 2014 +0200
@@ -108,8 +108,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return getSceneGraphObject().getTabPane().getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return getSceneGraphObject().getTabPane();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TableColumnPring.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TableColumnPring.java	Thu Sep 04 18:29:31 2014 +0200
@@ -40,7 +40,6 @@
 import javafx.scene.Node;
 import javafx.scene.control.TableColumn;
 import javafx.scene.control.TableView;
-import javafx.scene.transform.Transform;
 
 /**
  *
@@ -71,8 +70,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return getTableColumn().getTableView().getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return getTableColumn().getTableView();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TreeTableColumnPring.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TreeTableColumnPring.java	Thu Sep 04 18:29:31 2014 +0200
@@ -71,8 +71,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return getTreeTableColumn().getTreeTableView().getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return getTreeTableColumn().getTreeTableView();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/rudder/ResizeRudder.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/rudder/ResizeRudder.java	Thu Sep 04 18:29:31 2014 +0200
@@ -35,7 +35,6 @@
 import javafx.geometry.Point2D;
 import javafx.scene.Node;
 import javafx.scene.shape.Line;
-import javafx.scene.transform.Transform;
 
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.ContentPanelController;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.util.LineEquation;
@@ -68,8 +67,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return getSceneGraphObject().getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return getSceneGraphObject();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/AbstractNodeTring.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/AbstractNodeTring.java	Thu Sep 04 18:29:31 2014 +0200
@@ -35,7 +35,6 @@
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
 import javafx.geometry.Bounds;
 import javafx.scene.Node;
-import javafx.scene.transform.Transform;
 
 /**
  *
@@ -63,8 +62,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return getSceneGraphObject().getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return getSceneGraphObject();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TabTring.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TabTring.java	Thu Sep 04 18:29:31 2014 +0200
@@ -35,6 +35,7 @@
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver.TabOutline;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
 import javafx.geometry.Bounds;
+import javafx.scene.Node;
 import javafx.scene.control.Tab;
 import javafx.scene.control.TabPane;
 import javafx.scene.paint.Paint;
@@ -87,8 +88,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return getSceneGraphObject().getTabPane().getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return getSceneGraphObject().getTabPane();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TableColumnTring.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TableColumnTring.java	Thu Sep 04 18:29:31 2014 +0200
@@ -35,9 +35,9 @@
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver.TableViewDesignInfoX;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
 import javafx.geometry.Bounds;
+import javafx.scene.Node;
 import javafx.scene.control.TableColumn;
 import javafx.scene.control.TableView;
-import javafx.scene.transform.Transform;
 
 /**
  *
@@ -68,8 +68,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return getTableColumn().getTableView().getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return getTableColumn().getTableView();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TreeTableColumnTring.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TreeTableColumnTring.java	Thu Sep 04 18:29:31 2014 +0200
@@ -35,6 +35,7 @@
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver.TreeTableViewDesignInfoX;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
 import javafx.geometry.Bounds;
+import javafx.scene.Node;
 import javafx.scene.control.TreeTableColumn;
 import javafx.scene.control.TreeTableView;
 import javafx.scene.transform.Transform;
@@ -68,8 +69,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return getTreeTableColumn().getTreeTableView().getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return getTreeTableColumn().getTreeTableView();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/mode/HitNodeChrome.java	Thu Sep 04 15:59:55 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/mode/HitNodeChrome.java	Thu Sep 04 18:29:31 2014 +0200
@@ -80,8 +80,8 @@
     }
 
     @Override
-    public Transform getSceneGraphToSceneTransform() {
-        return closestNode.getLocalToSceneTransform();
+    public Node getSceneGraphObjectProxy() {
+        return closestNode;
     }
 
     @Override