]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Transform changes
authorjplaine <jplaine@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 6 Aug 2010 11:55:54 +0000 (11:55 +0000)
committerjplaine <jplaine@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 6 Aug 2010 11:55:54 +0000 (11:55 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@16989 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/BorderSceneGraph.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/CloudFactory.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/GraphPropertyNode.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverTextElementNoBounds.java

index 1a6b388b33333ef750d17ba8858f61e5b50c6fdc..96a3cd5e0516b11b53f6caeabb27e9144ca555e9 100644 (file)
@@ -1,5 +1,7 @@
 package org.simantics.sysdyn.ui.elements2;\r
 \r
+import java.awt.geom.AffineTransform;\r
+\r
 import org.simantics.g2d.element.ElementUtils;\r
 import org.simantics.g2d.element.IElement;\r
 import org.simantics.g2d.element.SceneGraphNodeKey;\r
@@ -23,6 +25,9 @@ public class BorderSceneGraph implements SceneGraph, Callback<RectangleNode> {
 \r
         // Calculate borders from text node bounds.\r
         node.init(ElementUtils.getElementBounds(e));\r
+        AffineTransform transform = ElementUtils.getTransform(e);\r
+        if(transform != null)\r
+               node.setTransform(transform);\r
     }\r
 \r
     @Override\r
index fd7277e8016d2426c7ab2aabdb46ac68f6a15ff7..20da2813192a81cbc05162b1037abae04fa7473f 100644 (file)
@@ -119,6 +119,9 @@ public class CloudFactory extends SysdynElementFactory {
             node.setScaleStroke(true);\r
             node.setColor(Color.BLACK);\r
             node.setShape(getCloudShape());\r
+            AffineTransform transform = ElementUtils.getTransform(e);\r
+            if(transform != null)\r
+               node.setTransform(transform);\r
             \r
             if(at != null)\r
                 node.setTransform(at);\r
index cc858c648cabd3b6988cb9af568edec260f7571c..04d0674d3012c92bd9c9d62fdccc5a18300d8172 100644 (file)
@@ -33,7 +33,6 @@ abstract public class GraphPropertyNode extends G2DNode {
        public void propertyChange(String field, Object value) {\r
        }\r
        \r
-       @Override\r
        public void setProperty(String field, Object value) {\r
                Field f = fields.get(field);\r
                if(f == null) {\r
index b8e9ff6c1dc593c7faf686c0ad327e857c41228e..e5b502d764ec14c27815cd97ddca3a28bd85fef8 100644 (file)
@@ -110,7 +110,7 @@ public class HoverTextElementNoBounds extends TextElementNoBounds {
         node.setEditable(editable);\r
         if(at != null)\r
             node.setTransform(at);\r
-\r
+            \r
         this.hoverHintListener = new IHintListener() {\r
             @Override\r
             public void hintRemoved(IHintObservable sender, Key key, Object oldValue) {\r