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

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

public class AddProvidesPortsEvent
extends java.util.EventObject

Used to notify components that the cca server added one or more Provides Ports to a component. A view entity might respond by rendering a box for each port. The boxes could be placed on the left side of the component.

Possible Scenario:
The end-user drags a component from the palette to the arena
The cca server instantiates a new cca component
The cca server creates Provides Ports for the new component
The cca server sends the Provides Ports to the client
The client displays the new Provides Ports are small boxes on the left side of the component

See Also:
Serialized Form

Field Summary
protected  java.util.Vector classNameAndInstanceNameOfAllPorts
          The class name and the instance name of all the ports that were added to a component.
protected  java.lang.String componentInstanceName
          The name of the component that is receiving the new ports.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AddProvidesPortsEvent(java.lang.Object source, java.lang.String componentInstanceName, java.util.Vector classNameAndInstanceNameOfAllPorts)
          Create an AddProvidesPortEvent.
 
Method Summary
 java.util.Vector getClassNameAndInstanceNameOfAllPorts()
          Get the class name and the instance name of all the ports that were added to a component.
 java.lang.String getComponentInstanceName()
           
 
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

componentInstanceName

protected java.lang.String componentInstanceName
The name of the component that is receiving the new ports. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "StartComponent0"


classNameAndInstanceNameOfAllPorts

protected java.util.Vector classNameAndInstanceNameOfAllPorts
The class name and the instance name of all the ports that were added to a component.

vector[0] contains the instance name of port[0]
vector[1] contains the class name of port[0]
vector[2] contains the instance name of port[1]
vector[3] contains the class name of port[1]
etc.

The class name of a port is the name of the port's java class. The class name may or may not include the package name. Examples of class names are "gov.cca.componentProperties" and "GoPort."

The instance name of a port is the name of an instantiation of the cca port. Examples of instance names are "cProps" and "go_port."

Constructor Detail

AddProvidesPortsEvent

public AddProvidesPortsEvent(java.lang.Object source,
                             java.lang.String componentInstanceName,
                             java.util.Vector classNameAndInstanceNameOfAllPorts)
Create an AddProvidesPortEvent. The event can be used to notify components that the cca server added one or more Provides Ports to a component. A view entity might respond by rendering a box for each component. The boxes could be placed on the left side of the component.

Parameters:
source - The object that created this event.
componentInstanceName - The name of the cca component that received the newly created ports. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "StartComponent0"
classNameAndInstanceNameOfAllPorts - the class name and the instance name of all the ports that were added to a component.
vector[0] contains the instance name of port[0]
vector[1] contains the class name of port[0]
vector[2] contains the instance name of port[1]
vector[3] contains the class name of port[1]
etc.
The class name of a port is the name of the port's java class. The class name may or may not include the package name. Examples of class names are "gov.cca.componentProperties" and "GoPort."
The instance name of a port is the name of an instantiation of the cca port. Examples of instance names are "cProps" and "go_port."
Method Detail

getComponentInstanceName

public java.lang.String getComponentInstanceName()

getClassNameAndInstanceNameOfAllPorts

public java.util.Vector getClassNameAndInstanceNameOfAllPorts()
Get the class name and the instance name of all the ports that were added to a component.

vector[0] contains the instance name of port[0]
vector[1] contains the class name of port[0]
vector[2] contains the instance name of port[1]
vector[3] contains the class name of port[1]
etc.

The class name of a port is the name of the port's java class. The class name may or may not include the package name. Examples of class names are "gov.cca.componentProperties" and "GoPort."

Returns:
The class name and the instance name of all ports that were added to a cca component.

The instance name of a port is the name of an instantiation of the cca port. The name is usually the name of the port's class (without the package name). Examples of instance names are "cProps" and "go_port."