X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Felement%2Fhandler%2Fimpl%2Fproxy%2FProxyTerminalHandler.java;h=e1c5d42933fd3f5e9c86f158607d90b8f757f041;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=2ff097a86facf0e37e5bff89e502ec4e6dd846dc;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/proxy/ProxyTerminalHandler.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/proxy/ProxyTerminalHandler.java index 2ff097a86..e1c5d4293 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/proxy/ProxyTerminalHandler.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/proxy/ProxyTerminalHandler.java @@ -1,52 +1,52 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 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 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.g2d.element.handler.impl.proxy; - -import java.awt.Shape; -import java.awt.geom.AffineTransform; - -import org.simantics.g2d.diagram.handler.Topology.Terminal; -import org.simantics.g2d.element.IElement; -import org.simantics.g2d.element.handler.TerminalLayout; -import org.simantics.g2d.utils.geom.DirectionSet; - -/** - * @author Toni Kalajainen - */ -public class ProxyTerminalHandler implements TerminalLayout { - - private static final long serialVersionUID = 219568974959605233L; - - TerminalLayout orig; - IProxyProvider provider; - - public ProxyTerminalHandler(IProxyProvider provider, TerminalLayout orig) { - this.provider = provider; - this.orig = orig; - } - - @Override - public AffineTransform getTerminalPosition(IElement node, Terminal t) { - return orig.getTerminalPosition(provider.provide(node), t); - } - - @Override - public boolean getTerminalDirection(IElement node, Terminal t, DirectionSet directions) { - return orig.getTerminalDirection(node, t, directions); - } - - @Override - public Shape getTerminalShape(IElement node, Terminal t) { - return orig.getTerminalShape(node, t); - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 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 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.g2d.element.handler.impl.proxy; + +import java.awt.Shape; +import java.awt.geom.AffineTransform; + +import org.simantics.g2d.diagram.handler.Topology.Terminal; +import org.simantics.g2d.element.IElement; +import org.simantics.g2d.element.handler.TerminalLayout; +import org.simantics.g2d.utils.geom.DirectionSet; + +/** + * @author Toni Kalajainen + */ +public class ProxyTerminalHandler implements TerminalLayout { + + private static final long serialVersionUID = 219568974959605233L; + + TerminalLayout orig; + IProxyProvider provider; + + public ProxyTerminalHandler(IProxyProvider provider, TerminalLayout orig) { + this.provider = provider; + this.orig = orig; + } + + @Override + public AffineTransform getTerminalPosition(IElement node, Terminal t) { + return orig.getTerminalPosition(provider.provide(node), t); + } + + @Override + public boolean getTerminalDirection(IElement node, Terminal t, DirectionSet directions) { + return orig.getTerminalDirection(node, t, directions); + } + + @Override + public Shape getTerminalShape(IElement node, Terminal t) { + return orig.getTerminalShape(node, t); + } + +}