abbot.script
Class Event

java.lang.Object
  extended by abbot.script.Step
      extended by abbot.script.Event
All Implemented Interfaces:
XMLConstants, XMLifiable, Serializable

public class Event
extends Step

Script step to generate a single AWT event to a component. Currently used for key down/up and mouse motion.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface abbot.script.XMLConstants
TAG_ACTION, TAG_APPLETVIEWER, TAG_ARCHIVE, TAG_ARGS, TAG_ASSERT, TAG_AWT, TAG_AWTTESTSCRIPT, TAG_BORDER_TITLE, TAG_CALL, TAG_CLASS, TAG_CLASSPATH, TAG_CODE, TAG_CODEBASE, TAG_COMMENT, TAG_COMPONENT, TAG_COUNT, TAG_DELEGATE, TAG_DESC, TAG_DOCBASE, TAG_EVENT, TAG_EXPR, TAG_FILENAME, TAG_FIXTURE, TAG_FORKED, TAG_HEIGHT, TAG_HORDER, TAG_ICON, TAG_ID, TAG_INDEX, TAG_INVERT, TAG_INVOKER, TAG_KEYCHAR, TAG_KEYCODE, TAG_KIND, TAG_LABEL, TAG_LAUNCH, TAG_METHOD, TAG_MODIFIERS, TAG_NAME, TAG_PARAMS, TAG_PARENT, TAG_POLL_INTERVAL, TAG_PROPERTY, TAG_ROOT, TAG_SAMPLE, TAG_SCRIPT, TAG_SEQUENCE, TAG_SLOW, TAG_STOP_ON_ERROR, TAG_STOP_ON_FAILURE, TAG_TAG, TAG_TERMINATE, TAG_TEXT, TAG_THREADED, TAG_TIMEOUT, TAG_TITLE, TAG_TRIGGER, TAG_TYPE, TAG_VALUE, TAG_VMARGS, TAG_VORDER, TAG_WAIT, TAG_WEIGHTED, TAG_WIDTH, TAG_WINDOW, TAG_X, TAG_Y
 
Constructor Summary
Event(Resolver resolver, Map attributes)
           
Event(Resolver resolver, String desc, AWTEvent event)
          Create one based on the given event.
 
Method Summary
 String getAttribute(String tag)
           
 Map getAttributes()
          Attributes to save in script.
 String getComponentID()
           
 String getDefaultDescription()
          Return a reasonable default description for this script step.
 String getKind()
           
 String getType()
           
 String getUsage()
          Provide a usage String for this step.
 String getXMLTag()
          Define the XML tag to use for this script step.
protected  Component resolve(String name)
          Resolve the given name into a component.
 void runStep()
          Send our event to the component's event queue.
 void setAttribute(String tag, String value)
           
 void setComponentID(String id)
           
 void setKind(String kind)
           
 void setType(String type)
           
 
Methods inherited from class abbot.script.Step
addAttributes, addContent, createAttributeMap, createStep, createStep, getDescription, getResolver, parseStepAttributes, resolveClass, resolveTester, run, setDescription, setScriptError, simpleClassName, toEditableString, toString, toXML, toXMLString, usage, usage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Event

public Event(Resolver resolver,
             Map attributes)

Event

public Event(Resolver resolver,
             String desc,
             AWTEvent event)
Create one based on the given event.

Method Detail

getDefaultDescription

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

Specified by:
getDefaultDescription in class Step

getXMLTag

public String getXMLTag()
Description copied from class: Step
Define the XML tag to use for this script step.

Specified by:
getXMLTag in class Step

getUsage

public String getUsage()
Description copied from class: Step
Provide a usage String for this step.

Specified by:
getUsage in class Step

getAttributes

public Map getAttributes()
Description copied from class: Step
Attributes to save in script.

Overrides:
getAttributes in class Step

runStep

public void runStep()
             throws Throwable
Send our event to the component's event queue.

Specified by:
runStep in class Step
Throws:
Throwable

resolve

protected Component resolve(String name)
                     throws NoSuchReferenceException,
                            ComponentNotFoundException,
                            MultipleComponentsFoundException
Resolve the given name into a component.

Throws:
NoSuchReferenceException
ComponentNotFoundException
MultipleComponentsFoundException

getType

public String getType()

setType

public void setType(String type)

getKind

public String getKind()

setKind

public void setKind(String kind)

getComponentID

public String getComponentID()

setComponentID

public void setComponentID(String id)

getAttribute

public String getAttribute(String tag)

setAttribute

public void setAttribute(String tag,
                         String value)


Copyright © 2002-2008 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge