01: package abbot.tester;
02:
03: import java.awt.*;
04: import javax.swing.*;
05:
06: /** Provides actions and assertions {@link JTextField}-based
07: * components.
08: */
09: public class JTextFieldTester extends JTextComponentTester {
10:
11: /**
12: * Enter and commit the given text.
13: */
14: public void actionCommitText(Component c, String text) {
15: actionEnterText(c, text);
16: actionCommit(c);
17: }
18:
19: /** Cause the text field's notify action to be triggered. */
20: public void actionCommit(Component c) {
21: actionActionMap(c, JTextField.notifyAction);
22: }
23: }
|