01: package abbot.tester;
02:
03: import java.awt.Component;
04:
05: /** Hierarchy placeholder for JRootPane. There are no specific user
06: * actions.
07: */
08: public class JRootPaneTester extends JComponentTester {
09:
10: /**
11: * Return a unique identifier for the given Component. There is only
12: * ever one JRootPane for a given Window, so derive from the parent's
13: * tag.
14: */
15: public String deriveTag(Component comp) {
16: // If the component class is custom, don't provide a tag
17: if (isCustom(comp.getClass()))
18: return null;
19:
20: String tag = null;
21: if (comp.getParent() != null) {
22: String ptag = getTag(comp.getParent());
23: if (ptag != null && !"".equals(ptag))
24: tag = ptag + " Root Pane";
25: }
26: if (tag == null || "".equals(tag))
27: tag = super.deriveTag(comp);
28: return tag;
29: }
30: }
|