01: package abbot.tester;
02:
03: import java.awt.Component;
04:
05: import javax.swing.*;
06:
07: public class AbstractButtonTester extends JComponentTester {
08:
09: public String deriveTag(Component comp) {
10: // If the component class is custom, don't provide a tag
11: if (isCustom(comp.getClass()))
12: return null;
13:
14: AbstractButton absButton = ((AbstractButton) comp);
15: String tag = stripHTML(absButton.getText());
16: if ("".equals(tag) || tag == null) {
17: tag = super .deriveTag(comp);
18: }
19: return tag;
20: }
21:
22: /** AbstractButton click action. */
23: public void actionClick(final Component c) {
24: /*
25: if (getEventMode() == EM_PROG) {
26: invokeAndWait(new Runnable() {
27: public void run() {
28: ((JButton)c).doClick();
29: }
30: });
31: }
32: */
33: click(c);
34: waitForIdle();
35: }
36: }
|