| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
package org.fest.swing.hierarchy; |
| 17 |
|
|
| 18 |
|
import static java.util.Collections.emptyList; |
| 19 |
|
import static org.fest.util.Collections.isEmpty; |
| 20 |
|
import static org.fest.util.Collections.list; |
| 21 |
|
|
| 22 |
|
import java.awt.*; |
| 23 |
|
import java.util.*; |
| 24 |
|
import java.util.List; |
| 25 |
|
|
| 26 |
|
import org.fest.swing.annotation.RunsInCurrentThread; |
| 27 |
|
|
| 28 |
|
|
| 29 |
|
@link |
| 30 |
|
|
| 31 |
|
@author |
| 32 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 5 |
Complexity Density: 0.71 |
|
| 33 |
|
final class WindowChildrenFinder implements ChildrenFinderStrategy { |
| 34 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 35 |
106841
|
@RunsInCurrentThread... |
| 36 |
|
public Collection<Component> nonExplicitChildrenOf(Container c) { |
| 37 |
79312
|
if (!(c instanceof Window)) return emptyList(); |
| 38 |
27528
|
return ownedWindows((Window)c); |
| 39 |
|
} |
| 40 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 41 |
27528
|
@RunsInCurrentThread... |
| 42 |
|
private Collection<Component> ownedWindows(Window w) { |
| 43 |
27528
|
return windows(list(w.getOwnedWindows())); |
| 44 |
|
} |
| 45 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 46 |
27530
|
private Collection<Component> windows(List<Window> windows) {... |
| 47 |
24713
|
if (isEmpty(windows)) return emptyList(); |
| 48 |
2817
|
return new ArrayList<Component>(windows); |
| 49 |
|
} |
| 50 |
|
} |