Sync git svn branch with SVN repository r33324.
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / diagram / participant / pointertool / TerminalUtil.java
index a28cfa56360230f754c5c3b7359b5d1c3250153c..409af79d69e4e0febb7fd69375ccb8f76d867fe1 100644 (file)
@@ -78,6 +78,17 @@ public class TerminalUtil {
             .append(']');\r
             return sb.toString();\r
         }\r
+\r
+        public static TerminalInfo create(Point2D p, IElement e, Terminal t, Shape terminalShape) {\r
+            AffineTransform at = AffineTransform.getTranslateInstance(p.getX(), p.getY());\r
+            TerminalInfo ti = new TerminalInfo();\r
+            ti.e = e;\r
+            ti.t = t;\r
+            ti.posElem = at;\r
+            ti.posDia = at;\r
+            ti.shape = terminalShape;\r
+            return ti;\r
+        }\r
     }\r
     private static final Rectangle2D POINT_PICK_SHAPE = new Rectangle2D.Double(0, 0, 0.001, 0.001);\r
 \r