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

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

public class InstantiateEvent
extends java.util.EventObject

Used to notify components that the cca server used a cca component class to instantiate a new cca component object. A view entity might respond by rendering a box inside of an arena.

Also used to notify components that an entity wants to retrieve a cca component. A view entity might respond by sending a "pulldown," "instantiate", or "create" message to the cca server.

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 sends the new component to this client
The client responds by display the component in the arena.

See Also:
Serialized Form

Field Summary
protected  java.lang.String instanceName
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
InstantiateEvent(java.lang.Object source, java.lang.String className, java.lang.String instanceName)
          Create an InstantiateEvent.
 
Method Summary
 java.lang.String getClassName()
          Get the name of the class that was used to instantiate a new cca component.
 java.lang.String getInstanceName()
           
 
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

instanceName

protected java.lang.String instanceName
Constructor Detail

InstantiateEvent

public InstantiateEvent(java.lang.Object source,
                        java.lang.String className,
                        java.lang.String instanceName)
Create an InstantiateEvent. The event can be used to notify components that the cca server used a cca component class to instantiate a new cca component object. A view entity might respond by rendering a box inside of an arena. Also used to notify components that an entity wants to retrieve a cca component. A view entity might respond by sending a "pulldown," "instantiate", or "create" message

Parameters:
source - The entity that created this event.
className - The name of the class that was used to instantiate a new cca component. The name is actually the name of the component's java class. EXAMPLE: "gov.sandia.ccaffeine.dc.component.PrinterComponent"
instanceName - The name of the newly instantiated cca component object. The instance name is usually the name of the component's java class (without the package name) concatenated with an index number. EXAMPLE: "StarterComponent0"
Method Detail

getClassName

public java.lang.String getClassName()
Get the name of the class that was used to instantiate a new cca component. The name is actually the name of the component's java class. EXAMPLE: "gov.sandia.ccaffeine.dc.component.PrinterComponent"

Returns:
The name of the newly added class.

getInstanceName

public java.lang.String getInstanceName()