]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/Terminals.java
Support for dynamic transforms for both elements and terminals
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / element / handler / impl / Terminals.java
index ca8518e6c38a5863267edb63b4f5336a01fdfe1b..786e07e0a045321d04d349a33864221cab53ab26 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * Copyright (c) 2007, 2017 Association for Decentralized Information Management
  * in Industry THTH ry.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *     VTT Technical Research Centre of Finland - initial API and implementation
+ *     Semantum Oy - #7119 refactoring
  *******************************************************************************/
 package org.simantics.g2d.element.handler.impl;
 
@@ -30,10 +31,10 @@ import org.simantics.g2d.utils.geom.DirectionSet;
  */
 public class Terminals implements TerminalLayout, TerminalTopology {
 
-    private static final long             serialVersionUID = -6532093690907028016L;
+    private static final long serialVersionUID = -6532093690907028016L;
 
-    private final Map<Terminal, ObjectTerminal> terminalMap      = new THashMap<Terminal, ObjectTerminal>();
-    private final ArrayList<Terminal>           terminals        = new ArrayList<Terminal>();
+    protected final Map<Terminal, ObjectTerminal> terminalMap = new THashMap<>();
+    protected final ArrayList<Terminal>           terminals   = new ArrayList<>();
 
     public Terminals(Collection<ObjectTerminal> ts) {
         for (ObjectTerminal ti : ts) {
@@ -47,7 +48,7 @@ public class Terminals implements TerminalLayout, TerminalTopology {
         ObjectTerminal ti = terminalMap.get(t);
         if (ti == null)
             return null;
-        return new AffineTransform(ti.getTransform());
+        return ti.getTransform();
     }
 
     @Override