gov.sandia.ccaffeine.dc.user_iface.MVC.event
Class ConnectEvent

java.lang.Object
  extended by java.util.EventObject
      extended by gov.sandia.ccaffeine.dc.user_iface.MVC.event.ConnectEvent
All Implemented Interfaces:
java.io.Serializable

public class ConnectEvent
extends java.util.EventObject

Used to notify components that the cca server connected a Provides Port from one component to a Uses Port. The Uses Port may be from the same component or may be from a different component. A view entity might respond by drawing a line between the two connected ports. Possible Scenario

Also used to notify components that an entity wants to connect a Provides Port from one component to a Uses Port. The Uses Port may be from the same component or may be from a different component. A view entity might respond by sending a "connect" message to the cca server. The end-user clicks on a red Uses Port
The end-user clicks on a Provides Port
The cca server connects the two ports
The cca server sends a connect message to this client
The client responds by drawing a line between the two ports

See Also:
Serialized Form

Field Summary
protected  java.lang.String sourceComponentName
           
protected  java.lang.String sourcePortName
           
protected  java.lang.String targetComponentName
           
protected  java.lang.String targetPortName
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ConnectEvent(java.lang.Object source, java.lang.String sourceComponentName, java.lang.String sourcePortName, java.lang.String targetComponentName, java.lang.String targetPortName)
          Create a ConnectEvent.
 
Method Summary
 java.lang.String getSourceComponentName()
          Get the name of the component that houses the source port.
 java.lang.String getSourcePortName()
          Get the name of the source port.
 java.lang.String getTargetComponentName()
          Get the name of the component that houses the target port.
 java.lang.String getTargetPortName()
          Get the name of the target port.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sourceComponentName

protected java.lang.String sourceComponentName

sourcePortName

protected java.lang.String sourcePortName

targetComponentName

protected java.lang.String targetComponentName

targetPortName

protected java.lang.String targetPortName
Constructor Detail

ConnectEvent

public ConnectEvent(java.lang.Object source,
                    java.lang.String sourceComponentName,
                    java.lang.String sourcePortName,
                    java.lang.String targetComponentName,
                    java.lang.String targetPortName)
Create a ConnectEvent. This event can be used to notify components that the cca server connected a Provides Port from one component to a Uses Port. The Uses Port may be from the same component or may be from a different component. A view entity might respond by drawing a line between the two connected ports.

Also used to notify components that an entity wants to connect a Provides Port from one component to a Uses Port. The Uses Port may be from the same component or may be from a different component. A view entity might respond by sending a "connect" message to the cca server.

Parameters:
source - The entity that created this event.
sourceComponentName - The name of the component that houses the source port. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "StartComponent0"
sourcePortName - The name of the source port. Example: "out0"
targetComponentName - The name of the component that houses the target port. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "PrinterComponent0"
targetPortName - the name of the target port. Example: "out0"
Method Detail

getSourceComponentName

public java.lang.String getSourceComponentName()
Get the name of the component that houses the source port. The source port is one of the two connected ports.

The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "StartComponent0"

Returns:
The name of the component that houses the source port.

getSourcePortName

public java.lang.String getSourcePortName()
Get the name of the source port. The source port is connected to the target port. Example: "out0"

Returns:
the name of the source port

getTargetComponentName

public java.lang.String getTargetComponentName()
Get the name of the component that houses the target port. The target port is one of the two connected ports. The target component is connected to the source component. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "Printer0"

Returns:
The name of the component that houses the target port.

getTargetPortName

public java.lang.String getTargetPortName()
Get the name of the target port. The target port is connected to the source port. Example: "out0"

Returns:
the name of the source port