abbot.editor.recorder
Class EventRecorder

java.lang.Object
  extended by abbot.editor.recorder.Recorder
      extended by abbot.editor.recorder.EventRecorder
All Implemented Interfaces:
SemanticEvents

public class EventRecorder
extends Recorder
implements SemanticEvents

Provides recording of raw AWT events and high-level semantic events. This is the main controller for any SemanticRecorder objects.


Field Summary
static long RECORDING_EVENT_MASK
          Events of interest when recording all actions.
(package private)  ArrayList steps
           
 
Fields inherited from interface abbot.editor.recorder.SemanticEvents
SE_ANY, SE_CLICK, SE_DRAG, SE_DROP, SE_IM, SE_KEY, SE_MENU, SE_NONE, SE_TEXT, SE_WINDOW
 
Constructor Summary
EventRecorder(Resolver resolver, boolean captureMotion)
          Create a Recorder for use in capturing raw AWTEvents.
 
Method Summary
protected  Step createStep()
          Return a sequence containing all the semantic and basic events captured thus far.
 long getEventMask()
          Return the events of interest to this Recorder.
 void insertStep(Step step)
          Insert an arbitrary script step into the currently recorded stream.
protected  void recordEvent(AWTEvent event)
          Handle an event.
 void start()
          Start recording a new event stream.
 void terminate()
          Indicate the end of the current event input stream.
 String toString()
          Return the name of the type of GUI action to be recorded.
 
Methods inherited from class abbot.editor.recorder.Recorder
addActionListener, getLastEventTime, getListener, getResolver, getStep, record, setStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

steps

ArrayList steps

RECORDING_EVENT_MASK

public static final long RECORDING_EVENT_MASK
Events of interest when recording all actions.

See Also:
Constant Field Values
Constructor Detail

EventRecorder

public EventRecorder(Resolver resolver,
                     boolean captureMotion)
Create a Recorder for use in capturing raw AWTEvents. Indicate whether mouse motion should be captured, and what semantic event type to capture.

Method Detail

toString

public String toString()
Return the name of the type of GUI action to be recorded.

Overrides:
toString in class Object

start

public void start()
Description copied from class: Recorder
Start recording a new event stream.

Overrides:
start in class Recorder

insertStep

public void insertStep(Step step)
Insert an arbitrary script step into the currently recorded stream.

Overrides:
insertStep in class Recorder

createStep

protected Step createStep()
Return a sequence containing all the semantic and basic events captured thus far.

Specified by:
createStep in class Recorder

terminate

public void terminate()
               throws RecordingFailedException
Description copied from class: Recorder
Indicate the end of the current event input stream.

Specified by:
terminate in class Recorder
Throws:
RecordingFailedException

recordEvent

protected void recordEvent(AWTEvent event)
                    throws RecordingFailedException
Handle an event. This can either be ignored or contribute to the recording. For a given event, if no current semantic recorder is active, select one based on the event's component. If the semantic recorder accepts the event, then it is used to consume each subsequent event, until its recordEvent method returns true, indicating that the semantic event has completed.

Specified by:
recordEvent in class Recorder
Throws:
RecordingFailedException - if an error was encountered and recording should be discontinued.

getEventMask

public long getEventMask()
Return the events of interest to this Recorder.

Overrides:
getEventMask in class Recorder


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

SourceForge