X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Fconnection%2FConnectionEntity.java;h=63f856206a207f4933bca21b150d291244e88e94;hb=6f11a60dee43d620d500c0cf5af34a1d91c80a8b;hp=89b204952f9cec017e694bb3a26902a8a3364ee8;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/connection/ConnectionEntity.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/connection/ConnectionEntity.java index 89b204952..63f856206 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/connection/ConnectionEntity.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/connection/ConnectionEntity.java @@ -1,82 +1,82 @@ -/******************************************************************************* - * 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.connection; - -import java.util.Collection; - -import org.simantics.g2d.diagram.handler.Topology.Connection; -import org.simantics.g2d.element.IElement; - -/** - * ConnectionEntity is an interface for querying the contents of a - * branched connection. - * - * @author Tuukka Lehtonen - */ -public interface ConnectionEntity { - - /** - * @return - */ - IElement getConnection(); - - /** - * Get all branch points that are part of this connection. - * - * @param result the collection to store the result into or - * null to allocate a new collection - * @return the result collection - */ - Collection getBranchPoints(Collection result); - - /** - * Get all segments that are part of this connection. - * - * @param result the collection to store the result into or - * null to allocate a new collection - * @return the result collection - */ - Collection getSegments(Collection result); - - /** - * Get all topological terminal connections of this connection entity. - * Terminal connections are the only way to attach a connection to an - * element terminal. - * - * @param result the collection to store the result into or - * null to allocate a new collection - * @return the result collection - */ - Collection getTerminalConnections(Collection result); - - public static class ConnectionEvent { - public final IElement connection; - public final Collection removedParts; - public final Collection addedParts; - - public ConnectionEvent(IElement connection, Collection removedParts, Collection addedParts) { - this.connection = connection; - this.removedParts = removedParts; - this.addedParts = addedParts; - } - } - - public interface ConnectionListener { - void connectionChanged(ConnectionEvent event); - } - - /** - * @param listener - */ - void setListener(ConnectionListener listener); - -} +/******************************************************************************* + * 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.connection; + +import java.util.Collection; + +import org.simantics.g2d.diagram.handler.Topology.Connection; +import org.simantics.g2d.element.IElement; + +/** + * ConnectionEntity is an interface for querying the contents of a + * branched connection. + * + * @author Tuukka Lehtonen + */ +public interface ConnectionEntity { + + /** + * @return + */ + IElement getConnection(); + + /** + * Get all branch points that are part of this connection. + * + * @param result the collection to store the result into or + * null to allocate a new collection + * @return the result collection + */ + Collection getBranchPoints(Collection result); + + /** + * Get all segments that are part of this connection. + * + * @param result the collection to store the result into or + * null to allocate a new collection + * @return the result collection + */ + Collection getSegments(Collection result); + + /** + * Get all topological terminal connections of this connection entity. + * Terminal connections are the only way to attach a connection to an + * element terminal. + * + * @param result the collection to store the result into or + * null to allocate a new collection + * @return the result collection + */ + Collection getTerminalConnections(Collection result); + + public static class ConnectionEvent { + public final IElement connection; + public final Collection removedParts; + public final Collection addedParts; + + public ConnectionEvent(IElement connection, Collection removedParts, Collection addedParts) { + this.connection = connection; + this.removedParts = removedParts; + this.addedParts = addedParts; + } + } + + public interface ConnectionListener { + void connectionChanged(ConnectionEvent event); + } + + /** + * @param listener + */ + void setListener(ConnectionListener listener); + +}