01: package abbot.tester;
02:
03: import java.awt.Component;
04:
05: import javax.swing.JLabel;
06:
07: /** Provides action methods and assertions for {@link JLabel}s. */
08:
09: public class JLabelTester extends JComponentTester {
10:
11: public String deriveTag(Component comp) {
12: // If the component class is custom, don't provide a tag
13: if (isCustom(comp.getClass()))
14: return null;
15:
16: String tag = stripHTML(((JLabel) comp).getText());
17: if (tag == null || "".equals(tag)) { //$NON-NLS-1$
18: tag = super.deriveTag(comp);
19: }
20: return tag;
21: }
22: }
|