|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| JLabelTester.java | 25% | 33.3% | 100% | 36.4% |
|
||||||||||||||
| 1 |
package abbot.tester;
|
|
| 2 |
|
|
| 3 |
import java.awt.Component;
|
|
| 4 |
|
|
| 5 |
import javax.swing.JLabel;
|
|
| 6 |
|
|
| 7 |
/** Provides action methods and assertions for {@link JLabel}s. */
|
|
| 8 |
|
|
| 9 |
public class JLabelTester extends JComponentTester { |
|
| 10 |
|
|
| 11 | 4 |
public String deriveTag(Component comp) {
|
| 12 |
// If the component class is custom, don't provide a tag
|
|
| 13 | 4 |
if (isCustom(comp.getClass()))
|
| 14 | 4 |
return null; |
| 15 |
|
|
| 16 | 0 |
String tag = stripHTML(((JLabel)comp).getText()); |
| 17 | 0 |
if (tag == null || "".equals(tag)) { //$NON-NLS-1$ |
| 18 | 0 |
tag = super.deriveTag(comp);
|
| 19 |
} |
|
| 20 | 0 |
return tag;
|
| 21 |
} |
|
| 22 |
} |
|
| 23 |
|
|
||||||||||