From: jplaine Date: Fri, 6 Aug 2010 11:55:54 +0000 (+0000) Subject: Transform changes X-Git-Tag: simantics-1.2.0~130 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=497293d5ab33708d9f13abb6cd03230e80996e07;p=simantics%2Fsysdyn.git Transform changes git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@16989 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/BorderSceneGraph.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/BorderSceneGraph.java index 1a6b388b..96a3cd5e 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/BorderSceneGraph.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/BorderSceneGraph.java @@ -1,5 +1,7 @@ package org.simantics.sysdyn.ui.elements2; +import java.awt.geom.AffineTransform; + import org.simantics.g2d.element.ElementUtils; import org.simantics.g2d.element.IElement; import org.simantics.g2d.element.SceneGraphNodeKey; @@ -23,6 +25,9 @@ public class BorderSceneGraph implements SceneGraph, Callback { // Calculate borders from text node bounds. node.init(ElementUtils.getElementBounds(e)); + AffineTransform transform = ElementUtils.getTransform(e); + if(transform != null) + node.setTransform(transform); } @Override diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/CloudFactory.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/CloudFactory.java index fd7277e8..20da2813 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/CloudFactory.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/CloudFactory.java @@ -119,6 +119,9 @@ public class CloudFactory extends SysdynElementFactory { node.setScaleStroke(true); node.setColor(Color.BLACK); node.setShape(getCloudShape()); + AffineTransform transform = ElementUtils.getTransform(e); + if(transform != null) + node.setTransform(transform); if(at != null) node.setTransform(at); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/GraphPropertyNode.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/GraphPropertyNode.java index cc858c64..04d0674d 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/GraphPropertyNode.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/GraphPropertyNode.java @@ -33,7 +33,6 @@ abstract public class GraphPropertyNode extends G2DNode { public void propertyChange(String field, Object value) { } - @Override public void setProperty(String field, Object value) { Field f = fields.get(field); if(f == null) { diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverTextElementNoBounds.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverTextElementNoBounds.java index b8e9ff6c..e5b502d7 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverTextElementNoBounds.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverTextElementNoBounds.java @@ -110,7 +110,7 @@ public class HoverTextElementNoBounds extends TextElementNoBounds { node.setEditable(editable); if(at != null) node.setTransform(at); - + this.hoverHintListener = new IHintListener() { @Override public void hintRemoved(IHintObservable sender, Key key, Object oldValue) {