com.pnp.xfeature.models
Class FeatureConnectionModel

java.lang.Object
  extended by com.pnp.xfeature.models.AbstractComponentModel
      extended by com.pnp.xfeature.models.FeatureConnectionModel

public class FeatureConnectionModel
extends AbstractComponentModel

Model of the connections between feature nodes.

Author:
Kamil Ekstein, created on 12.11.2004, totally redesigned on 12.3.2005 by Ondrej Rohlik

Constructor Summary
FeatureConnectionModel()
           
 
Method Summary
 void attachSource()
          attaches the connection to its source
 void attachTarget()
          attaches the connection to its target
 void disconnect()
          Disconnect this connection from the shapes it is attached to.
 FeatureNodeModel getSource()
          getter method
 FeatureNodeModel getTarget()
          getter method
 void reconnect()
          Reconnect this connection.
 void reconnect(FeatureNodeModel newSource, FeatureNodeModel newTarget)
          Reconnect to a different source and/or target shape.
 void setSource(FeatureNodeModel source)
          sets the "source" property and attached the connection to it source via call of attachSource()
 void setTarget(FeatureNodeModel target)
          sets the "target" property and attached the connection to it source via call of attacTarget()
 java.lang.String toString()
           
 
Methods inherited from class com.pnp.xfeature.models.AbstractComponentModel
addPropertyChangeListener, firePropertyChange, getEditableValue, getPropertyDescriptors, getPropertyValue, isPropertySet, removePropertyChangeListener, resetPropertyValue, setPropertyValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FeatureConnectionModel

public FeatureConnectionModel()
Method Detail

attachSource

public void attachSource()
attaches the connection to its source


attachTarget

public void attachTarget()
attaches the connection to its target


getSource

public FeatureNodeModel getSource()
getter method


getTarget

public FeatureNodeModel getTarget()
getter method


setSource

public void setSource(FeatureNodeModel source)
sets the "source" property and attached the connection to it source via call of attachSource()


setTarget

public void setTarget(FeatureNodeModel target)
sets the "target" property and attached the connection to it source via call of attacTarget()


disconnect

public void disconnect()
Disconnect this connection from the shapes it is attached to.


reconnect

public void reconnect()
Reconnect this connection. The connection will reconnect with the shapes it was previously attached to.


reconnect

public void reconnect(FeatureNodeModel newSource,
                      FeatureNodeModel newTarget)
Reconnect to a different source and/or target shape. The connection will disconnect from its current attachments and reconnect to the new source and target.

Parameters:
newSource - a new source endpoint for this connection (non null)
newTarget - a new target endpoint for this connection (non null)
Throws:
java.lang.IllegalArgumentException - if any of the paramers are null or newSource == newTarget

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004 - 2008 ETH Zurich and P&P Software GmbH, All Rights Reserved.