X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Felement%2Fhandler%2FTerminalLayout.java;h=038e68dc2ca275d01e4d17f4a600c88a7fd7abfd;hb=refs%2Fchanges%2F38%2F238%2F2;hp=87152e523c484a5173599d63d51c172bc6c7b7c3;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/TerminalLayout.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/TerminalLayout.java index 87152e523..038e68dc2 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/TerminalLayout.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/TerminalLayout.java @@ -1,58 +1,58 @@ -/******************************************************************************* - * 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; - -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.impl.StaticTerminals; -import org.simantics.g2d.utils.geom.DirectionSet; - -/** - * - * @See {@link TerminalTopology} Enumeration of terminals - * @See {@link StaticTerminals} Compile handler for elements with static terminals (almost all) - * @author Toni Kalajainen - */ -public interface TerminalLayout extends ElementHandler { - - /** - * Get a copy of terminal transformation (on element) - * @param node - * @param t - * @return position of a terminal or null - */ - AffineTransform getTerminalPosition(IElement node, Terminal t); - - /** - * Get Terminal direction - * @param node node - * @param t terminal - * @param directions collection where directions are added (compass direction, 0 + n*360=north, n e N) - * @return true if this handler could tell the terminal direction - */ - boolean getTerminalDirection(IElement node, Terminal t, DirectionSet directions); - - /** - * Get shape of a terminal. - * If terminal has a shape its selection is based on it and is zoom-level dependent. - * If a terminal has no shape it is a point and zoom-level independent. - * - * Only the area that fits into the element will be picked. - * - * @return shape shape or null - */ - Shape getTerminalShape(IElement node, Terminal 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; + +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.impl.StaticTerminals; +import org.simantics.g2d.utils.geom.DirectionSet; + +/** + * + * @See {@link TerminalTopology} Enumeration of terminals + * @See {@link StaticTerminals} Compile handler for elements with static terminals (almost all) + * @author Toni Kalajainen + */ +public interface TerminalLayout extends ElementHandler { + + /** + * Get a copy of terminal transformation (on element) + * @param node + * @param t + * @return position of a terminal or null + */ + AffineTransform getTerminalPosition(IElement node, Terminal t); + + /** + * Get Terminal direction + * @param node node + * @param t terminal + * @param directions collection where directions are added (compass direction, 0 + n*360=north, n e N) + * @return true if this handler could tell the terminal direction + */ + boolean getTerminalDirection(IElement node, Terminal t, DirectionSet directions); + + /** + * Get shape of a terminal. + * If terminal has a shape its selection is based on it and is zoom-level dependent. + * If a terminal has no shape it is a point and zoom-level independent. + * + * Only the area that fits into the element will be picked. + * + * @return shape shape or null + */ + Shape getTerminalShape(IElement node, Terminal t); + +}