org.concord.pedagogica.engine
Class ActivityArc

java.lang.Object
  |
  +--org.concord.pedagogica.engine.ActivityScript
        |
        +--org.concord.pedagogica.engine.ActivityArc
All Implemented Interfaces:
java.lang.Runnable, ScriptError

public class ActivityArc
extends ActivityScript


Field Summary
protected  ScriptThread arcThread
           
protected  java.lang.Thread initializer
           
protected  ActivityNode sink
           
protected  ActivityNode source
           
 
Fields inherited from class org.concord.pedagogica.engine.ActivityScript
errorHandler, ext, lastError, name, nodeAccess, parent, root, runtime, script, scriptFile, scriptText, scriptThread, scriptType, state, synchronizer, textSelection, tryName, viewText
 
Constructor Summary
ActivityArc(Activity parent)
          Primary constructor for arc object in Activity state machine.
ActivityArc(Activity parent, ActivityNode source, ActivityNode sink)
           
 
Method Summary
 void activate()
           
 void deactivate()
           
 void delete()
          Delete the ActivityArc object.
 ActivityNode getSink()
           
 ActivityNode getSource()
           
 void setSink(ActivityNode sink)
           
 void setSource(ActivityNode source)
           
 boolean test()
           
 void traverse()
           
 
Methods inherited from class org.concord.pedagogica.engine.ActivityScript
addStateVariable, clearLastError, getLastError, getLevel, getLogging, getName, getNodeAccess, getParent, getPath, getRoot, getScript, getScriptType, getState, getText, getTextSelection, getViewText, initialize, load, load, parseError, readText, removeStateVariable, run, runError, setErrorHandler, setLastError, setName, setNodeAccess, setScriptType, setText, setText, setViewText, showError, startEventProcessing, stopEventProcessing, writeText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

protected ActivityNode source

sink

protected ActivityNode sink

initializer

protected java.lang.Thread initializer

arcThread

protected ScriptThread arcThread
Constructor Detail

ActivityArc

public ActivityArc(Activity parent)
Primary constructor for arc object in Activity state machine. This is the object that controls the transitions between TraceNode objects. It has a script that is run at initialization and whose designated methods are test and transition. The test method is called at the discretion of the node script whenever a state transition is possible. Iftest() returns true then the arc is traversed to the destination state by calling the arc script's traverse method.
Parameters:
parent - The Activity object that controls the entire state machine.
source - The node the arc is leaving.
sink - The node at which the arc is arriving.
See Also:
Activity, ActivityNode

ActivityArc

public ActivityArc(Activity parent,
                   ActivityNode source,
                   ActivityNode sink)
Method Detail

delete

public void delete()
Delete the ActivityArc object. Removes the delted arc from its source and sink nodes as well as from the parent Activity object.
Overrides:
delete in class ActivityScript
See Also:
Activity, ActivityNode

getSource

public ActivityNode getSource()

setSource

public void setSource(ActivityNode source)

getSink

public ActivityNode getSink()

setSink

public void setSink(ActivityNode sink)

test

public boolean test()

traverse

public void traverse()

activate

public void activate()

deactivate

public void deactivate()