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

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

public class ParamEvent
extends java.util.EventObject

Cca components contain ports. Some of the ports contain data fields. This event can be used to notify components that an entity is either sending the value of one of these data fields or is querying for the value of one of these data fields. A view entity might respond by displaying the current value on the screen or by sending a "parameters" message to the cca server.

Possible Scenario:
An end-user clicks on a blue port inside of a component
client sends "parameters" to server
serer- sends "ParamDialog" to client
client responds by creating an empty dialog box
server sends "ParamTab" to client
client responds by inserting a new tab in the dialog box
server sends "ParamField" to client
client responds by inserting a blank data line into the dialog box
server sends "ParamCurrent" to client
client responds by inserting the data's value into the dialog box
server sends "ParamHelp" to client
client responds by setting the text that is displayed if the help button is clicked
server sends "ParamPrompt" to client
client responds by displaying a prompt to the left of the data's value
server sends "ParamDefault" to client
client responds by setting the data's default value
server sends "ParamStringChoice" to client
client responds by setting an item in the value's choice box
server sends "ParamNumberRange" to client
client responds by setting the data value's range of allowed values
server sends "ParamEndDialog" to client
client responds by displaying the dialog box on the screen

See Also:
Serialized Form

Field Summary
protected  java.lang.String componentInstanceName
           
protected  java.lang.String dataFieldName
          The name of a data field.
protected  java.lang.String dataFieldValue
           
protected  int numberOfArguments
           
protected  java.lang.String portInstanceName
          The name of the port that contains the data field.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ParamEvent(java.lang.Object source, int numberOfArguments, java.lang.String componentInstanceName, java.lang.String portInstanceName, java.lang.String dataFieldName)
          Create a ParamCurrentEvent.
ParamEvent(java.lang.Object source, int numberOfArguments, java.lang.String componentInstanceName, java.lang.String portInstanceName, java.lang.String dataFieldName, java.lang.String dataFieldValue)
          Create a ParamCurrentEvent.
ParamEvent(java.lang.Object source, java.lang.String componentInstanceName, java.lang.String portInstanceName, java.lang.String dataFieldName)
          Create a ParamCurrentEvent.
 
Method Summary
 java.lang.String getComponentInstanceName()
           
 java.lang.String getDataFieldName()
          Get the name of a data field.
 java.lang.String getDataFieldValue()
           
 int getNumberOfArguments()
          Get the number of arguments.
 java.lang.String getPortInstanceName()
          Get the name of the port that contains the data field.
 
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

numberOfArguments

protected int numberOfArguments

componentInstanceName

protected java.lang.String componentInstanceName

portInstanceName

protected java.lang.String portInstanceName
The name of the port that contains the data field. Example: "configure_port"


dataFieldName

protected java.lang.String dataFieldName
The name of a data field.


dataFieldValue

protected java.lang.String dataFieldValue
Constructor Detail

ParamEvent

public ParamEvent(java.lang.Object source,
                  java.lang.String componentInstanceName,
                  java.lang.String portInstanceName,
                  java.lang.String dataFieldName)
Create a ParamCurrentEvent.

Cca components contain ports. Some of the ports contain data fields. This event can be used to notify components that an entity is either sending the value of one of these data fields or is querying for the value. A view entity might respond by displaying the current value on the screen or by sending a "parameters" message to the cca server.

Parameters:
source - The entity that created this event.
componentInstanceName - The name of the cca component that contains the port which contains the data field. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "TimeStamper0"
portInstanceName - The name of a port that contains the data field. Example: "configure_port"
dataFieldName - The name of the data field.

ParamEvent

public ParamEvent(java.lang.Object source,
                  int numberOfArguments,
                  java.lang.String componentInstanceName,
                  java.lang.String portInstanceName,
                  java.lang.String dataFieldName)
Create a ParamCurrentEvent.

Cca components contain ports. Some of the ports contain data fields. This event can be used to notify components that an entity is either sending the value of one of these data fields or is querying for the value. A view entity might respond by displaying the current value on the screen or by sending a "parameters" message to the cca server.

Parameters:
source - The entity that created this event.
numberOfArguments - If we are tying to get the value of a parameter then we need 3 arguments (instanceName, portName, parameterName). If we are trying to set the value of a parameter then we need 4 or more arguments
componentInstanceName - The name of the cca component that contains the port which contains the data field. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "TimeStamper0"
portInstanceName - The name of a port that contains the data field. Example: "configure_port"
dataFieldName - The name of the data field.

ParamEvent

public ParamEvent(java.lang.Object source,
                  int numberOfArguments,
                  java.lang.String componentInstanceName,
                  java.lang.String portInstanceName,
                  java.lang.String dataFieldName,
                  java.lang.String dataFieldValue)
Create a ParamCurrentEvent.

Cca components contain ports. Some of the ports contain data fields. This event can be used to notify components that an entity is either sending the value of one of these data fields or is querying for the value. A view entity might respond by displaying the current value on the screen or by sending a "parameters" message to the cca server.

Parameters:
source - The entity that created this event.
numberOfArguments - If we are tying to get the value of a parameter then we need 3 arguments (instanceName, portName, parameterName). If we are trying to set the value of a parameter then we need 4 or more arguments
componentInstanceName - The name of the cca component that contains the port which contains the data field. The name is usually the java class name of the component (without the package name) concatenated with an index number. Example: "TimeStamper0"
portInstanceName - The name of a port that contains the data field. Example: "configure_port"
dataFieldName - The name of the data field.
dataFieldValue - If an entity is setting the value of a data field then we need to know what that value is. Can be set to null;
Method Detail

getNumberOfArguments

public int getNumberOfArguments()
Get the number of arguments.

If we are tying to get the value of a parameter then we need 3 arguments (instanceName, portName, parameterName). If we are trying to set the value of a parameter then we need 4 or more arguments (instanceName, portName, parameterName, parameterValue).

Returns:
The number of arguments.

getComponentInstanceName

public java.lang.String getComponentInstanceName()

getPortInstanceName

public java.lang.String getPortInstanceName()
Get the name of the port that contains the data field.

Returns:
The instance name of the port.

getDataFieldName

public java.lang.String getDataFieldName()
Get the name of a data field.

Returns:
The name of the data field.

getDataFieldValue

public java.lang.String getDataFieldValue()