]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/WholeElementTerminals.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / element / handler / impl / WholeElementTerminals.java
diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/WholeElementTerminals.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/WholeElementTerminals.java
new file mode 100644 (file)
index 0000000..443c3fc
--- /dev/null
@@ -0,0 +1,27 @@
+package org.simantics.g2d.element.handler.impl;\r
+\r
+import java.awt.Shape;\r
+import java.util.Collection;\r
+\r
+import org.simantics.g2d.diagram.handler.Topology.Terminal;\r
+import org.simantics.g2d.element.ElementUtils;\r
+import org.simantics.g2d.element.IElement;\r
+\r
+/**\r
+ * @author Tuukka Lehtonen\r
+ */\r
+public class WholeElementTerminals extends Terminals {\r
+\r
+    private static final long serialVersionUID = -1366493887226451146L;\r
+\r
+    public WholeElementTerminals(Collection<ObjectTerminal> ts) {\r
+        super(ts);\r
+    }\r
+\r
+    @Override\r
+    public Shape getTerminalShape(IElement node, Terminal t) {\r
+        // For each terminal, return the shape of the element.\r
+        return ElementUtils.getElementShapeOrBounds(node);\r
+    }\r
+\r
+}\r