public abstract class Recorder extends Object
Recorder
provides a mechanism for recording an event stream and
generating a sequence of script steps from that stream.
NOTE: when writing a recorder, be very careful not to test for platform-specific behavior, and avoid being susceptible to platform-specific bugs. Please make sure the recorder works on both pointer-focus and click-to-focus window managers, as well as on at least two platforms.
Constructor and Description |
---|
Recorder(Resolver resolver)
Create a Recorder for use in converting events into script steps.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(ActionListener al)
The recorder supports zero or one listeners.
|
protected abstract Step |
createStep()
Create a step or sequence of steps based on the event stream so far.
|
long |
getEventMask()
Return the events of interest to this Recorder.
|
long |
getLastEventTime() |
protected ActionListener |
getListener() |
protected Resolver |
getResolver() |
Step |
getStep()
Return a step or sequence of steps representing the steps created thus
far, or null if none.
|
void |
insertStep(Step step)
Insert an arbitrary step into the recording stream.
|
void |
record(AWTEvent event)
Process the given event.
|
protected abstract void |
recordEvent(AWTEvent event)
Implement this to actually handle the event.
|
protected void |
setStatus(String msg)
Indicate the current recording state, so that the status may be
displayed elsewhere.
|
void |
start()
Start recording a new event stream.
|
abstract void |
terminate()
Indicate the end of the current event input stream.
|
public Recorder(Resolver resolver)
public void addActionListener(ActionListener al)
protected ActionListener getListener()
public void start()
public abstract void terminate() throws RecordingFailedException
RecordingFailedException
public long getLastEventTime()
protected abstract Step createStep()
public Step getStep()
public void insertStep(Step step)
public void record(AWTEvent event) throws RecordingFailedException
RecordingFailedException
- if an error was encountered and
recording should discontinue.protected abstract void recordEvent(AWTEvent event) throws RecordingFailedException
RecordingFailedException
- if an error was encountered and
recording should be discontinued.public long getEventMask()
protected void setStatus(String msg)
Abbot is hosted on