changeset 7676:8f931434e0c7

[SCENEBUILDER] Preparatory work for DTL-6797 (Content panel should rely on SubScene). Simplified AbstractDecoration (sceneToSceneGraphObject() and sceneGraphObjectToScene() are not necessary ; getSceneGraphToSceneTransform() is enough).
author eric.le.ponner <eric.le.ponner@oracle.com>
date Thu, 14 Aug 2014 09:27:04 +0200
parents 438fee7942f4
children cba4400b96aa
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, 2 insertions(+), 199 deletions(-) [+]
line wrap: on
line diff
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/AbstractDecoration.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/AbstractDecoration.java	Thu Aug 14 09:27:04 2014 +0200
@@ -152,8 +152,6 @@
     
     public abstract Bounds getSceneGraphObjectBounds();
     public abstract Transform getSceneGraphToSceneTransform();
-    public abstract Point2D sceneGraphObjectToScene(double x, double y);
-    public abstract Point2D sceneToSceneGraphObject(double x, double y);
     protected abstract void startListeningToSceneGraphObject();
     protected abstract void stopListeningToSceneGraphObject();
     protected abstract void layoutDecoration();
@@ -164,7 +162,8 @@
      */
     
     public Point2D sceneGraphObjectToDecoration(double x, double y) {
-        return getRootNode().sceneToLocal(sceneGraphObjectToScene(x, y));
+        final Transform t = getSceneGraphToSceneTransform();
+        return getRootNode().sceneToLocal(t.transform(x, y));
     }
             
     protected void startListeningToLayoutBounds(Node node) {
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/gridpane/GridPanePring.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/gridpane/GridPanePring.java	Thu Aug 14 09:27:04 2014 +0200
@@ -81,16 +81,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        return getSceneGraphObject().localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        return getSceneGraphObject().sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         startListeningToLayoutBounds(getSceneGraphObject());
         startListeningToLocalToSceneTransform(getSceneGraphObject());
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/AbstractCurveHandles.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/AbstractCurveHandles.java	Thu Aug 14 09:27:04 2014 +0200
@@ -70,16 +70,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        return getSceneGraphObject().localToScene(x,y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        return getSceneGraphObject().sceneToLocal(x,y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         startListeningToLocalToSceneTransform(getSceneGraphObject());
     }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/AbstractNodeHandles.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/AbstractNodeHandles.java	Thu Aug 14 09:27:04 2014 +0200
@@ -67,16 +67,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        return getSceneGraphObject().localToScene(x,y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        return getSceneGraphObject().sceneToLocal(x,y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         startListeningToLayoutBounds(getSceneGraphObject());
         startListeningToLocalToSceneTransform(getSceneGraphObject());
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TabHandles.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TabHandles.java	Thu Aug 14 09:27:04 2014 +0200
@@ -111,22 +111,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        assert isReady();
-        assert tabPane != null;
-        
-        return tabPane.localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        assert isReady();
-        assert tabPane != null;
-        
-        return tabPane.sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         assert isReady();
         assert tabPane != null;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TableColumnHandles.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TableColumnHandles.java	Thu Aug 14 09:27:04 2014 +0200
@@ -117,20 +117,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        assert isReady();
-        assert tableView != null;
-        return tableView.localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        assert isReady();
-        assert tableView != null;
-        return tableView.sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         assert isReady();
         assert tableView != null;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TreeTableColumnHandles.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/handles/TreeTableColumnHandles.java	Thu Aug 14 09:27:04 2014 +0200
@@ -117,20 +117,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        assert isReady();
-        assert treeTableView != null;
-        return treeTableView.localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        assert isReady();
-        assert treeTableView != null;
-        return treeTableView.sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         assert isReady();
         assert treeTableView != null;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/outline/NodeOutline.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/outline/NodeOutline.java	Thu Aug 14 09:27:04 2014 +0200
@@ -65,16 +65,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        return getSceneGraphObject().localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        return getSceneGraphObject().sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         startListeningToLayoutBounds(getSceneGraphObject());
         startListeningToLocalToSceneTransform(getSceneGraphObject());
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/NodePring.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/NodePring.java	Thu Aug 14 09:27:04 2014 +0200
@@ -70,16 +70,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        return getSceneGraphObject().localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        return getSceneGraphObject().sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         startListeningToLayoutBounds(getSceneGraphObject());
         startListeningToLocalToSceneTransform(getSceneGraphObject());
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TabPring.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TabPring.java	Thu Aug 14 09:27:04 2014 +0200
@@ -114,18 +114,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        final TabPane tabPane = getSceneGraphObject().getTabPane();
-        return tabPane.localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        final TabPane tabPane = getSceneGraphObject().getTabPane();
-        return tabPane.sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         assert tabNode == null;
         
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TableColumnPring.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TableColumnPring.java	Thu Aug 14 09:27:04 2014 +0200
@@ -77,18 +77,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        final TableView<?> tv = getTableColumn().getTableView();
-        return tv.localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        final TableView<?> tv = getTableColumn().getTableView();
-        return tv.sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         final TableView<?> tableView = getTableColumn().getTableView();
         startListeningToLayoutBounds(tableView);
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TreeTableColumnPring.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/pring/TreeTableColumnPring.java	Thu Aug 14 09:27:04 2014 +0200
@@ -77,18 +77,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        final TreeTableView<?> ttv = getTreeTableColumn().getTreeTableView();
-        return ttv.localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        final TreeTableView<?> ttv = getTreeTableColumn().getTreeTableView();
-        return ttv.sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         final TreeTableView<?> ttv = getTreeTableColumn().getTreeTableView();
         startListeningToLayoutBounds(ttv);
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/rudder/ResizeRudder.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/rudder/ResizeRudder.java	Thu Aug 14 09:27:04 2014 +0200
@@ -73,16 +73,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        return getSceneGraphObject().localToScene(x,y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        return getSceneGraphObject().sceneToLocal(x,y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         startListeningToLayoutBounds(getSceneGraphObject());
         startListeningToLocalToSceneTransform(getSceneGraphObject());
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/AbstractNodeTring.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/AbstractNodeTring.java	Thu Aug 14 09:27:04 2014 +0200
@@ -69,16 +69,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        return getSceneGraphObject().localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        return getSceneGraphObject().sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         startListeningToLayoutBounds(getSceneGraphObject());
         startListeningToLocalToSceneTransform(getSceneGraphObject());
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TabTring.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TabTring.java	Thu Aug 14 09:27:04 2014 +0200
@@ -93,18 +93,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        final TabPane tabPane = getSceneGraphObject().getTabPane();
-        return tabPane.localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        final TabPane tabPane = getSceneGraphObject().getTabPane();
-        return tabPane.sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         final TabPane tabPane = getSceneGraphObject().getTabPane();
         startListeningToLayoutBounds(tabPane);
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TableColumnTring.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TableColumnTring.java	Thu Aug 14 09:27:04 2014 +0200
@@ -74,18 +74,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        final TableView<?> tv = getTableColumn().getTableView();
-        return tv.localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        final TableView<?> tv = getTableColumn().getTableView();
-        return tv.sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         final TableView<?> tableView = getTableColumn().getTableView();
         startListeningToLayoutBounds(tableView);
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TreeTableColumnTring.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/driver/tring/TreeTableColumnTring.java	Thu Aug 14 09:27:04 2014 +0200
@@ -74,18 +74,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        final TreeTableView<?> tv = getTreeTableColumn().getTreeTableView();
-        return tv.localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        final TreeTableView<?> tv = getTreeTableColumn().getTreeTableView();
-        return tv.sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         final TreeTableView<?> tableView = getTreeTableColumn().getTreeTableView();
         startListeningToLayoutBounds(tableView);
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/mode/HitNodeChrome.java	Wed Aug 13 16:21:50 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/mode/HitNodeChrome.java	Thu Aug 14 09:27:04 2014 +0200
@@ -86,16 +86,6 @@
     }
 
     @Override
-    public Point2D sceneGraphObjectToScene(double x, double y) {
-        return closestNode.localToScene(x, y);
-    }
-
-    @Override
-    public Point2D sceneToSceneGraphObject(double x, double y) {
-        return closestNode.sceneToLocal(x, y);
-    }
-
-    @Override
     protected void startListeningToSceneGraphObject() {
         startListeningToLayoutBounds(closestNode);
         startListeningToLocalToSceneTransform(closestNode);