| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
package org.fest.swing.driver; |
| 17 |
|
|
| 18 |
|
import static org.fest.swing.driver.JTreeChildOfPathCountQuery.childCount; |
| 19 |
|
import static org.fest.util.Strings.concat; |
| 20 |
|
|
| 21 |
|
import javax.swing.JTree; |
| 22 |
|
import javax.swing.tree.TreePath; |
| 23 |
|
|
| 24 |
|
import org.fest.swing.annotation.RunsInEDT; |
| 25 |
|
import org.fest.swing.timing.Condition; |
| 26 |
|
|
| 27 |
|
|
| 28 |
|
@link |
| 29 |
|
|
| 30 |
|
@author |
| 31 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (11) |
Complexity: 4 |
Complexity Density: 0.57 |
|
| 32 |
|
class JTreeChildrenShowUpCondition extends Condition { |
| 33 |
|
|
| 34 |
|
private JTree tree; |
| 35 |
|
private TreePath path; |
| 36 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 37 |
56
|
static JTreeChildrenShowUpCondition untilChildrenShowUp(JTree tree, TreePath path) {... |
| 38 |
56
|
return new JTreeChildrenShowUpCondition(tree, path); |
| 39 |
|
} |
| 40 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 41 |
56
|
private JTreeChildrenShowUpCondition(JTree tree, TreePath path) {... |
| 42 |
56
|
super(concat(path.toString(), " to show")); |
| 43 |
56
|
this.tree = tree; |
| 44 |
56
|
this.path = path; |
| 45 |
|
} |
| 46 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 47 |
56
|
@RunsInEDT... |
| 48 |
|
public boolean test() { |
| 49 |
56
|
return childCount(tree, path) != 0; |
| 50 |
|
} |
| 51 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 52 |
56
|
@Override protected void done() {... |
| 53 |
56
|
tree = null; |
| 54 |
56
|
path = null; |
| 55 |
|
} |
| 56 |
|
} |