| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
package org.fest.swing.driver; |
| 16 |
|
|
| 17 |
|
import static org.fest.swing.edt.GuiActionRunner.execute; |
| 18 |
|
|
| 19 |
|
import javax.swing.JTabbedPane; |
| 20 |
|
|
| 21 |
|
import org.fest.swing.annotation.RunsInCurrentThread; |
| 22 |
|
import org.fest.swing.edt.GuiQuery; |
| 23 |
|
import org.fest.swing.util.TextMatcher; |
| 24 |
|
|
| 25 |
|
|
| 26 |
|
@link |
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
@author |
| 34 |
|
@author |
| 35 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 36 |
|
final class JTabbedPaneTabIndexQuery { |
| 37 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 38 |
7
|
@RunsInCurrentThread... |
| 39 |
|
static int indexOfTab(final JTabbedPane tabbedPane, final TextMatcher matcher) { |
| 40 |
7
|
return execute(new GuiQuery<Integer>() { |
|
|
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
| 41 |
7
|
protected Integer executeInEDT() {... |
| 42 |
7
|
int tabCount = tabbedPane.getTabCount(); |
| 43 |
15
|
for (int i = 0; i < tabCount; i++) |
| 44 |
4
|
if (matcher.isMatching(tabbedPane.getTitleAt(i))) return i; |
| 45 |
3
|
return -1; |
| 46 |
|
} |
| 47 |
|
}); |
| 48 |
|
} |
| 49 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 50 |
|
private JTabbedPaneTabIndexQuery() {}... |
| 51 |
|
} |