]> gerrit.simantics Code Review - simantics/platform.git/blob - 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
1 package org.simantics.g2d.element.handler.impl;\r
2 \r
3 import java.awt.Shape;\r
4 import java.util.Collection;\r
5 \r
6 import org.simantics.g2d.diagram.handler.Topology.Terminal;\r
7 import org.simantics.g2d.element.ElementUtils;\r
8 import org.simantics.g2d.element.IElement;\r
9 \r
10 /**\r
11  * @author Tuukka Lehtonen\r
12  */\r
13 public class WholeElementTerminals extends Terminals {\r
14 \r
15     private static final long serialVersionUID = -1366493887226451146L;\r
16 \r
17     public WholeElementTerminals(Collection<ObjectTerminal> ts) {\r
18         super(ts);\r
19     }\r
20 \r
21     @Override\r
22     public Shape getTerminalShape(IElement node, Terminal t) {\r
23         // For each terminal, return the shape of the element.\r
24         return ElementUtils.getElementShapeOrBounds(node);\r
25     }\r
26 \r
27 }\r