ControlBeans
Class ComponentContainer

java.lang.Object
  |
  +--ControlBeans.ComponentContainer

public class ComponentContainer
extends java.lang.Object

This class implements an object that can store components. It is used by AbstractCommunicator and should not be used directly by the user.


Constructor Summary
ComponentContainer()
          Creates a ComponentContainer with the ability to hold components with tags up to 999.
 
Method Summary
 void addComponent(ComponentInterface component)
          Adds a component to this container.
 void putValue(double value, int aTag, double time, int ID)
          Invoked by AbstractCommunicator in order to pass received values on to the components stored in this container.
 void putValue(int value, int aTag, double time, int ID)
          Invoked by AbstractCommunicator in order to pass received values on to the components stored in this container.
 void putValue(java.lang.String value, int aTag, double time, int ID)
          Invoked by AbstractCommuncator in order to pass received values on to the components stored in this container.
 void requestValues()
          Called by the communicator to make all components send their value(s).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentContainer

public ComponentContainer()
Creates a ComponentContainer with the ability to hold components with tags up to 999.
Method Detail

addComponent

public void addComponent(ComponentInterface component)
Adds a component to this container. Invoked by AbstractCommunicator. If the component has multiple tags, a reference for each tag will be stored.
Parameters:
component - a reference to the component to be added

putValue

public void putValue(int value,
                     int aTag,
                     double time,
                     int ID)
Invoked by AbstractCommunicator in order to pass received values on to the components stored in this container. It will pass the value on to each component that has a tag corresponding to aTag.
Parameters:
value - the value to be set
aTag - the value will be only passed to components containing this tag
time - a time tag for the value
ID - the ID of the component
See Also:
ComponentInterface.putValue(int, int, double, int)

putValue

public void putValue(double value,
                     int aTag,
                     double time,
                     int ID)
Invoked by AbstractCommunicator in order to pass received values on to the components stored in this container. It will pass the value on to each component that has a tag corresponding to aTag.
Parameters:
value - the value to be set
aTag - the value will be only passed to components containing this tag
time - a time tag for the value
ID - the ID of the component
See Also:
ComponentInterface.putValue(double, int, double, int)

putValue

public void putValue(java.lang.String value,
                     int aTag,
                     double time,
                     int ID)
Invoked by AbstractCommuncator in order to pass received values on to the components stored in this container. It will pass the value on to each component that has a tag corresponding to aTag.
Parameters:
value - the value to be set
aTag - the value will be only passed to components containing this tag
time - a time tag for the value
ID - the ID of the component
See Also:
ComponentInterface.putValue(java.lang.String, int, double, int)

requestValues

public void requestValues()
Called by the communicator to make all components send their value(s). This can be used for initialization.