junit.extensions.awt.editor
Class TextRecorder
java.lang.Object
|
+--junit.extensions.awt.editor.Recorder
|
+--junit.extensions.awt.editor.TextRecorder
- public class TextRecorder
- extends Recorder
Method Summary |
protected Step |
createStep()
Create a script step based on the information gathered so far. |
void |
eventDispatched(java.awt.AWTEvent event)
Watch for a sequence of characters to be typed. |
long |
getEventMask()
Listen for keystrokes and termination events. |
java.lang.String |
getName()
Return the name of the type of GUI action to be recorded. |
protected void |
initialize()
Set up state prior to capturing events. |
protected boolean |
shouldStop()
Override this to indicate when the recording whould terminate (not
cancel. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextRecorder
public TextRecorder(Resolver resolver,
ComponentFinder finder,
java.awt.event.ActionListener al)
- Record a series of keystrokes into a text component.
getName
public java.lang.String getName()
- Description copied from class:
Recorder
- Return the name of the type of GUI action to be recorded.
- Overrides:
getName
in class Recorder
getEventMask
public long getEventMask()
- Listen for keystrokes and termination events.
- Overrides:
getEventMask
in class Recorder
initialize
protected void initialize()
- Description copied from class:
Recorder
- Set up state prior to capturing events.
- Overrides:
initialize
in class Recorder
shouldStop
protected boolean shouldStop()
- Description copied from class:
Recorder
- Override this to indicate when the recording whould terminate (not
cancel.
- Overrides:
shouldStop
in class Recorder
createStep
protected Step createStep()
- Description copied from class:
Recorder
- Create a script step based on the information gathered so far.
- Overrides:
createStep
in class Recorder
eventDispatched
public void eventDispatched(java.awt.AWTEvent event)
- Watch for a sequence of characters to be typed. Terminate recording
when we get VK_ENTER or a focus change out of the text component.
Cancel if we get any characters into a non-text component.
- Overrides:
eventDispatched
in class Recorder