|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| JTextFieldTester.java | - | 100% | 100% | 100% |
|
||||||||||||||
| 1 |
package abbot.tester;
|
|
| 2 |
|
|
| 3 |
import java.awt.*;
|
|
| 4 |
import javax.swing.*;
|
|
| 5 |
import javax.swing.text.*;
|
|
| 6 |
|
|
| 7 |
import abbot.Log;
|
|
| 8 |
import abbot.i18n.Strings;
|
|
| 9 |
import javax.swing.text.DefaultEditorKit;
|
|
| 10 |
|
|
| 11 |
/** Provides actions and assertions {@link JTextField}-based
|
|
| 12 |
* components.
|
|
| 13 |
*/
|
|
| 14 |
public class JTextFieldTester extends JTextComponentTester { |
|
| 15 |
|
|
| 16 |
/**
|
|
| 17 |
* Enter and commit the given text.
|
|
| 18 |
*/
|
|
| 19 | 1 |
public void actionCommitText(Component c, String text) { |
| 20 | 1 |
actionEnterText(c, text); |
| 21 | 1 |
actionCommit(c); |
| 22 |
} |
|
| 23 |
|
|
| 24 |
/** Cause the text field's notify action to be triggered. */
|
|
| 25 | 2 |
public void actionCommit(Component c) { |
| 26 | 2 |
actionActionMap(c, JTextField.notifyAction); |
| 27 |
} |
|
| 28 |
} |
|
| 29 |
|
|
||||||||||