01: package abbot.tester;
02:
03: import java.awt.*;
04:
05: public class FrameTester extends WindowTester {
06:
07: /** Return a unique tag to help identify the given component. */
08: public String deriveTag(java.awt.Component comp) {
09: // If the component class is custom, don't provide a tag
10: if (isCustom(comp.getClass()))
11: return null;
12:
13: String tag = ((java.awt.Frame) comp).getTitle();
14: if (tag == null || "".equals(tag)) {
15: tag = super .deriveTag(comp);
16: }
17: return tag;
18: }
19:
20: /** Iconify the given Frame. */
21: public void actionIconify(Component comp) {
22: iconify((Frame) comp);
23: waitForIdle();
24: }
25:
26: /** Deiconify the given Frame. */
27: public void actionDeiconify(Component comp) {
28: deiconify((Frame) comp);
29: waitForIdle();
30: }
31:
32: /** Maximize the given Frame. */
33: public void actionMaximize(Component comp) {
34: maximize((Frame) comp);
35: waitForIdle();
36: }
37:
38: /** Normalize the given Frame. Note that on 1.3.1 systems this may have
39: * no effect after a maximize.
40: */
41: public void actionNormalize(Component comp) {
42: normalize((Frame) comp);
43: waitForIdle();
44: }
45:
46: }
|