context.arch.enactor
Interface EnactorListener


public interface EnactorListener

A listener class for enactors. Any listener registered with an enactor gets called whenever the relevent events occur with that enactor. Listeners can listen to many enactors; the particular enactor responsible for calling an enactor can be retrieved through EnactorReference or EnactorParameter arguments. EnactorListeners currently do not receive componentAdded calls for all components for which they might receive componentEvaluated calls, if they are added to an enactor after a particular component was added. This may change if/when stricter semantics guaranteeing adds before evaluations is implemented. TODO: modify this comment when semantics are modified

Author:
alann

Field Summary
static java.lang.String ACTION_TRIGGERED
           
static java.lang.String COMPONENT_ADDED
           
static java.lang.String COMPONENT_EVALUATED
           
static java.lang.String COMPONENT_REMOVED
           
static java.lang.String PARAMETER_VALUE_CHANGED
           
 
Method Summary
 void componentAdded(EnactorReference rwr, ComponentDescription widgetDescription, Attributes paramAtts)
          called when a new CTK component matches an enactor reference.
 void componentEvaluated(EnactorReference rwr, ComponentDescription widgetDescription)
          called whenever a component is evaluated by an enactor.
 void componentRemoved(EnactorReference rwr, ComponentDescription widgetDescription, Attributes paramAtts)
          called when a CTK component no longer matches an enactor reference.
 void parameterValueChanged(EnactorParameter parameter, Attributes validAtts, java.lang.Object value)
          called when the value of an enactor parameter changes.
 

Field Detail

COMPONENT_EVALUATED

public static final java.lang.String COMPONENT_EVALUATED
See Also:
Constant Field Values

COMPONENT_ADDED

public static final java.lang.String COMPONENT_ADDED
See Also:
Constant Field Values

COMPONENT_REMOVED

public static final java.lang.String COMPONENT_REMOVED
See Also:
Constant Field Values

PARAMETER_VALUE_CHANGED

public static final java.lang.String PARAMETER_VALUE_CHANGED
See Also:
Constant Field Values

ACTION_TRIGGERED

public static final java.lang.String ACTION_TRIGGERED
See Also:
Constant Field Values
Method Detail

componentEvaluated

public void componentEvaluated(EnactorReference rwr,
                               ComponentDescription widgetDescription)
called whenever a component is evaluated by an enactor. This typically occurs when a component (that matches the description query of a reference) sends a new CTK Callback.

Parameters:
rwr - the reference that evaluated the component.
widgetDescription -

componentAdded

public void componentAdded(EnactorReference rwr,
                           ComponentDescription widgetDescription,
                           Attributes paramAtts)
called when a new CTK component matches an enactor reference. If the enactor establishes any parameter-related attributes for this component, they are passed along as well. TODO: make parameter attribute handling more clear, consistent

Parameters:
rwr - the relevant enactor reference
widgetDescription - the description of the added component
paramAtts - initial values for any enactor parameters for this component

componentRemoved

public void componentRemoved(EnactorReference rwr,
                             ComponentDescription widgetDescription,
                             Attributes paramAtts)
called when a CTK component no longer matches an enactor reference. TODO: make parameter attribute handling more clear, consistent

Parameters:
rwr - the relevant enactor reference
widgetDescription - the description of the removed component
paramAtts - any enactor parameter values of the component

parameterValueChanged

public void parameterValueChanged(EnactorParameter parameter,
                                  Attributes validAtts,
                                  java.lang.Object value)
called when the value of an enactor parameter changes. A parameter change may occur relative to particular attributes; those attributes are passed along. TODO: modify after fixing attribute handling

Parameters:
parameter - the enactor parameter
validAtts - attributes for which the change occurs
value - the new value of the changed parameter