org.knime.core.node.workflow
Class ConnectionContainer

java.lang.Object
  extended by org.knime.core.node.workflow.ConnectionContainer
All Implemented Interfaces:
EventListener, ConnectionProgressListener

public class ConnectionContainer
extends Object
implements ConnectionProgressListener

Holds all information related to one connection between specific ports of two nodes. It also holds additional information, which can be adjusted from the outside (bend points on a layout, for example).

Author:
M. Berthold/B. Wiswedel, University of Konstanz

Nested Class Summary
(package private) static class ConnectionContainer.ConnectionType
           
 
Constructor Summary
ConnectionContainer(org.knime.core.node.workflow.NodeID src, int srcPort, org.knime.core.node.workflow.NodeID dest, int destPort, ConnectionContainer.ConnectionType type)
          Creates new connection.
 
Method Summary
 void addProgressListener(ConnectionProgressListener listener)
          Adds a listener to the list of registered progress listeners.
 void addUIInformationListener(ConnectionUIInformationListener l)
          Add a listener to the list of registered listeners.
 void cleanup()
          Removes all registered listeners in order to release references on this object.
 boolean equals(Object obj)
          
 org.knime.core.node.workflow.NodeID getDest()
           
 int getDestPort()
           
 ConnectionID getID()
           
 org.knime.core.node.workflow.NodeID getSource()
           
 int getSourcePort()
           
 ConnectionContainer.ConnectionType getType()
           
 ConnectionUIInformation getUIInfo()
           
 int hashCode()
          
 boolean isDeletable()
           
protected  void notifyProgressListeners(ConnectionProgressEvent evt)
          Notifies all registered progress listeners with the argument event.
protected  void notifyUIListeners(ConnectionUIInformationEvent evt)
          Notifies all registered listeners with the argument event.
 void progressChanged(ConnectionProgressEvent pe)
          Invoked when the progress has changed.
 void removeProgressListener(ConnectionProgressListener listener)
          Removes a listener from the list of registered progress listeners.
 void removeUIInformationListener(ConnectionUIInformationListener l)
          Remove a registered listener from the listener list.
(package private)  void setDeletable(boolean isDeletable)
           
 void setUIInfo(ConnectionUIInformation uiInfo)
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionContainer

public ConnectionContainer(org.knime.core.node.workflow.NodeID src,
                           int srcPort,
                           org.knime.core.node.workflow.NodeID dest,
                           int destPort,
                           ConnectionContainer.ConnectionType type)
Creates new connection.

Parameters:
src - source node
srcPort - port of source node
dest - destination node
destPort - port of destination node
type - of connection
Method Detail

getUIInfo

public ConnectionUIInformation getUIInfo()
Returns:
the uiInfo

getDest

public org.knime.core.node.workflow.NodeID getDest()
Returns:
the dest

getDestPort

public int getDestPort()
Returns:
the destPort

getSource

public org.knime.core.node.workflow.NodeID getSource()
Returns:
the source

getSourcePort

public int getSourcePort()
Returns:
the sourcePort

isDeletable

public boolean isDeletable()
Returns:
the isDeletable

setDeletable

void setDeletable(boolean isDeletable)
Parameters:
isDeletable - the isDeletable to set

getType

public ConnectionContainer.ConnectionType getType()
Returns:
type of the connection

getID

public ConnectionID getID()
Returns:
the ID for this connection.

setUIInfo

public void setUIInfo(ConnectionUIInformation uiInfo)
Parameters:
uiInfo - the uiInfo to set

addUIInformationListener

public void addUIInformationListener(ConnectionUIInformationListener l)
Add a listener to the list of registered listeners.

Parameters:
l - The listener to add, must not be null.

removeUIInformationListener

public void removeUIInformationListener(ConnectionUIInformationListener l)
Remove a registered listener from the listener list.

Parameters:
l - The listener to remove.

addProgressListener

public void addProgressListener(ConnectionProgressListener listener)
Adds a listener to the list of registered progress listeners.

Parameters:
listener - The listener to add, must not be null.

removeProgressListener

public void removeProgressListener(ConnectionProgressListener listener)
Removes a listener from the list of registered progress listeners.

Parameters:
listener - The listener to remove

progressChanged

public void progressChanged(ConnectionProgressEvent pe)
Invoked when the progress has changed.

Specified by:
progressChanged in interface ConnectionProgressListener
Parameters:
pe - The progress event holding the progress information.

cleanup

public void cleanup()
Removes all registered listeners in order to release references on this object.


notifyProgressListeners

protected void notifyProgressListeners(ConnectionProgressEvent evt)
Notifies all registered progress listeners with the argument event.

Parameters:
evt - The event to fire.

notifyUIListeners

protected void notifyUIListeners(ConnectionUIInformationEvent evt)
Notifies all registered listeners with the argument event.

Parameters:
evt - The event to fire.

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright, 2003 - 2011. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.