| 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.JTreeAddRootIfInvisibleTask.addRootIfInvisible; |
| 19 |
|
import static org.fest.swing.edt.GuiActionRunner.execute; |
| 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.edt.GuiTask; |
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
@see |
| 31 |
|
@see |
| 32 |
|
|
| 33 |
|
@author |
| 34 |
|
@author |
| 35 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 36 |
|
final class JTreeExpandPathTask { |
| 37 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 38 |
58
|
@RunsInEDT... |
| 39 |
|
static void expandTreePath(final JTree tree, final TreePath path) { |
| 40 |
58
|
execute(new GuiTask() { |
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 41 |
58
|
protected void executeInEDT() {... |
| 42 |
58
|
TreePath realPath = addRootIfInvisible(tree, path); |
| 43 |
32
|
if (!tree.isExpanded(path)) tree.expandPath(realPath); |
| 44 |
|
} |
| 45 |
|
}); |
| 46 |
|
} |
| 47 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 48 |
|
private JTreeExpandPathTask() {}... |
| 49 |
|
} |