1 /*******************************************************************************
\r
2 * Copyright (c) 2010 Association for Decentralized Information Management in
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.sysdyn.ui.elements;
\r
14 import java.awt.Shape;
\r
15 import java.util.Collection;
\r
17 import org.simantics.g2d.diagram.handler.Topology.Terminal;
\r
18 import org.simantics.g2d.element.ElementUtils;
\r
19 import org.simantics.g2d.element.IElement;
\r
20 import org.simantics.g2d.element.handler.impl.ObjectTerminal;
\r
21 import org.simantics.g2d.element.handler.impl.Terminals;
\r
24 * @author Tuukka Lehtonen
\r
26 public class WholeElementTerminals extends Terminals {
\r
28 private static final long serialVersionUID = -8209833430671135001L;
\r
30 public WholeElementTerminals(Collection<ObjectTerminal> ts) {
\r
35 public Shape getTerminalShape(IElement node, Terminal t) {
\r
36 // For each terminal, return the shape of the element.
\r
37 return ElementUtils.getElementShapeOrBounds(node);
\r