|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object abbot.editor.recorder.SemanticRecorder
public abstract class SemanticRecorder
Template for recording AWTEvents and converting them into an appropriate semantic event. The EventRecorder class decides which SemanticRecorder to use and handles cancel/termination. Implementations should be named AbstractButtonRecorder, JTableRecorder, etc. The semantic recorders will be dynamically loaded based on the component receiving a given event (compare to ComponentTester).
See EventRecorder for implementation details.
Field Summary | |
---|---|
protected ArrayList |
events
|
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 | |
---|---|
SemanticRecorder(Resolver resolver)
Create a SemanticRecorder for use in capturing the semantics of a GUI action. |
Method Summary | |
---|---|
abstract boolean |
accept(AWTEvent event)
Returns whether this SemanticRecorder wishes to accept the given event and subsequent events. |
void |
addActionListener(ActionListener al)
Supports at most one listener. |
protected abstract Step |
createStep()
Create a step based on the events received thus far. |
int |
getRecordingType()
|
protected Resolver |
getResolver()
Return the Resolver to be used by this recorder. |
Step |
getStep()
Returns the script step generated from the events recorded so far. |
protected void |
init(int recordingType)
|
boolean |
isFinished()
Return whether this recorder has finished recording the current semantic event. |
abstract boolean |
parse(AWTEvent event)
Handle an event. |
boolean |
record(AWTEvent event)
Handle an event. |
protected void |
setFinished(boolean state)
Invoke when end of the semantic event has been seen. |
protected void |
setRecordingType(int type)
|
protected void |
setStatus(String msg)
Indicate the current recording state, so that the status may be displayed elsewhere. |
protected void |
setStep(Step newStep)
Add the given step. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ArrayList events
Constructor Detail |
---|
public SemanticRecorder(Resolver resolver)
Method Detail |
---|
public void addActionListener(ActionListener al)
public int getRecordingType()
protected void setRecordingType(int type)
protected void init(int recordingType)
public abstract boolean accept(AWTEvent event)
public final boolean record(AWTEvent event)
public abstract boolean parse(AWTEvent event)
protected Resolver getResolver()
public Step getStep() throws BugReport
BugReport
protected abstract Step createStep()
protected void setStep(Step newStep)
public boolean isFinished()
protected void setFinished(boolean state)
protected void setStatus(String msg)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |