junit.extensions.awt.script
Class StepSequence

java.lang.Object
  |
  +--junit.extensions.awt.script.ScriptStep
        |
        +--junit.extensions.awt.script.StepSequence
All Implemented Interfaces:
Sequence, Step, Tags, XMLifiable

public class StepSequence
extends ScriptStep
implements Sequence

Script step to send an AWT event to a component.


Fields inherited from interface junit.extensions.awt.script.Tags
TAG_ACTION, TAG_ARGS, TAG_ASSERT, TAG_AWTTESTSCRIPT, TAG_CLASS, TAG_COMPONENT, TAG_COUNT, TAG_DESC, TAG_EVENT, TAG_FILENAME, TAG_ID, TAG_INVERT, TAG_INVOKER, TAG_KEYCHAR, TAG_KEYCODE, TAG_KIND, TAG_LAUNCH, TAG_METHOD, TAG_MODIFIERS, TAG_NAME, TAG_PARENT, TAG_POLL_INTERVAL, TAG_SCRIPT, TAG_SEQUENCE, TAG_TAG, TAG_TERMINATE, TAG_TIMEOUT, TAG_TITLE, TAG_TRIGGER, TAG_TYPE, TAG_VALUE, TAG_WAIT, TAG_WINDOW, TAG_X, TAG_Y
 
Constructor Summary
StepSequence(ComponentManager resolver, org.w3c.dom.Element el, java.util.HashMap atts)
           
StepSequence(ComponentManager resolver, java.lang.String desc, java.util.Vector steps)
          Create an aggregate from existing AWTEvents.
 
Method Summary
 void addStep(int index, Step step)
           
 void addStep(Step step)
           
 void clear()
           
protected  java.lang.String getContents()
          Override if the step actually has some contents.
protected  java.lang.String getDefaultDescription()
          Return a reasonable default description for this script step.
 Step getStep(int index)
           
protected  java.lang.String getUsage()
          Provide a usage String for this step.
protected  java.lang.String getXMLTag()
          Define the XML tag to use for this script step.
 int indexOf(Step step)
           
 void removeStep(int index)
           
 void removeStep(Step step)
           
protected  void runStep()
          Process each event in our list.
 void setStep(int index, Step step)
           
 int size()
           
 java.util.Enumeration steps()
           
 
Methods inherited from class junit.extensions.awt.script.ScriptStep
createStep, createStep, getAttributes, getDescription, getError, getFailure, getManager, getTester, resolve, resolveTester, run, setError, setFailure, toString, toXML, usage, usage
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StepSequence

public StepSequence(ComponentManager resolver,
                    org.w3c.dom.Element el,
                    java.util.HashMap atts)
             throws InvalidScriptException

StepSequence

public StepSequence(ComponentManager resolver,
                    java.lang.String desc,
                    java.util.Vector steps)
Create an aggregate from existing AWTEvents.
Method Detail

getDefaultDescription

protected java.lang.String getDefaultDescription()
Description copied from class: ScriptStep
Return a reasonable default description for this script step. This value is used in the absence of an explicit description.
Overrides:
getDefaultDescription in class ScriptStep

getXMLTag

protected java.lang.String getXMLTag()
Description copied from class: ScriptStep
Define the XML tag to use for this script step.
Overrides:
getXMLTag in class ScriptStep

getContents

protected java.lang.String getContents()
Description copied from class: ScriptStep
Override if the step actually has some contents. In most cases, it wont't.
Overrides:
getContents in class ScriptStep

getUsage

protected java.lang.String getUsage()
Description copied from class: ScriptStep
Provide a usage String for this step.
Overrides:
getUsage in class ScriptStep

runStep

protected void runStep()
                throws java.lang.Throwable
Process each event in our list.
Overrides:
runStep in class ScriptStep

size

public int size()
Specified by:
size in interface Sequence

clear

public void clear()
Specified by:
clear in interface Sequence

steps

public java.util.Enumeration steps()
Specified by:
steps in interface Sequence

indexOf

public int indexOf(Step step)
Specified by:
indexOf in interface Sequence

getStep

public Step getStep(int index)
Specified by:
getStep in interface Sequence

addStep

public void addStep(int index,
                    Step step)
Specified by:
addStep in interface Sequence

addStep

public void addStep(Step step)
Specified by:
addStep in interface Sequence

setStep

public void setStep(int index,
                    Step step)
Specified by:
setStep in interface Sequence

removeStep

public void removeStep(Step step)
Specified by:
removeStep in interface Sequence

removeStep

public void removeStep(int index)
Specified by:
removeStep in interface Sequence