X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Felementclass%2FFlagHandler.java;h=0e5e35092b139ea2ebadf1728063bcd11e724f48;hp=eb8d6e8365516deaa391d44f3cb79ce175407d76;hb=refs%2Fchanges%2F38%2F238%2F2;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/elementclass/FlagHandler.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/elementclass/FlagHandler.java index eb8d6e836..0e5e35092 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/elementclass/FlagHandler.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/elementclass/FlagHandler.java @@ -1,56 +1,56 @@ -/******************************************************************************* - * 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.elementclass; - -import org.simantics.g2d.diagram.IDiagram; -import org.simantics.g2d.element.IElement; -import org.simantics.g2d.element.ElementClass.Single; -import org.simantics.g2d.element.handler.ElementHandler; - -/** - * @author Tuukka Lehtonen - */ -@Single -public interface FlagHandler extends ElementHandler { - - FlagClass.Type getType(IElement e); - void setType(IElement e, FlagClass.Type type); - - boolean isExternal(IElement e); - /** - * A flag can be set as external only when it is not connected. - * - * @param e - * @param external - * @return - */ - void setExternal(IElement e, boolean external); - - void connect(IElement e1, IElement e2); - - /** - * @param e1 the element to connect - * @param o1 the back-end object of e1 - * @param o2 the other object o1 is connected to or null if - * disconnected - */ - void connectData(IElement e1, Object o1, Object o2); - - FlagClass.Connection getConnection(IElement e); - FlagClass.Connection getConnectionData(IElement e); - - void disconnect(IElement e); - - boolean isWithinDiagram(IDiagram d, FlagClass.Connection c); - IElement getCorrespondence(IElement end); - -} +/******************************************************************************* + * 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.elementclass; + +import org.simantics.g2d.diagram.IDiagram; +import org.simantics.g2d.element.IElement; +import org.simantics.g2d.element.ElementClass.Single; +import org.simantics.g2d.element.handler.ElementHandler; + +/** + * @author Tuukka Lehtonen + */ +@Single +public interface FlagHandler extends ElementHandler { + + FlagClass.Type getType(IElement e); + void setType(IElement e, FlagClass.Type type); + + boolean isExternal(IElement e); + /** + * A flag can be set as external only when it is not connected. + * + * @param e + * @param external + * @return + */ + void setExternal(IElement e, boolean external); + + void connect(IElement e1, IElement e2); + + /** + * @param e1 the element to connect + * @param o1 the back-end object of e1 + * @param o2 the other object o1 is connected to or null if + * disconnected + */ + void connectData(IElement e1, Object o1, Object o2); + + FlagClass.Connection getConnection(IElement e); + FlagClass.Connection getConnectionData(IElement e); + + void disconnect(IElement e); + + boolean isWithinDiagram(IDiagram d, FlagClass.Connection c); + IElement getCorrespondence(IElement end); + +}