| 1 |
|
package org.fest.swing.driver; |
| 2 |
|
|
| 3 |
|
import static org.fest.swing.edt.GuiActionRunner.execute; |
| 4 |
|
|
| 5 |
|
import javax.swing.JTree; |
| 6 |
|
import javax.swing.tree.TreePath; |
| 7 |
|
|
| 8 |
|
import org.fest.swing.annotation.RunsInEDT; |
| 9 |
|
import org.fest.swing.edt.GuiQuery; |
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
@link |
| 14 |
|
|
| 15 |
|
@author |
| 16 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 17 |
|
final class JTreeChildOfPathCountQuery { |
| 18 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 19 |
57
|
@RunsInEDT... |
| 20 |
|
static int childCount(final JTree tree, final TreePath path) { |
| 21 |
57
|
return execute(new GuiQuery<Integer>() { |
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 22 |
57
|
protected Integer executeInEDT() {... |
| 23 |
57
|
Object lastPathComponent = path.getLastPathComponent(); |
| 24 |
57
|
return tree.getModel().getChildCount(lastPathComponent); |
| 25 |
|
} |
| 26 |
|
}); |
| 27 |
|
} |
| 28 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 29 |
|
private JTreeChildOfPathCountQuery() {}... |
| 30 |
|
} |