Returns the index of the tab containing the specified Data object. @param data the Data @return the index, or -1 if not found
(Data data)
| 2436 | * @return the index, or -1 if not found |
| 2437 | */ |
| 2438 | protected int getTabIndex(Data data) { |
| 2439 | for (int i = 0; i < tabbedPane.getTabCount(); i++) { |
| 2440 | DataToolTab tab = (DataToolTab) tabbedPane.getComponentAt(i); |
| 2441 | if (tab.isOwnedBy(data)) { |
| 2442 | return i; |
| 2443 | } |
| 2444 | } |
| 2445 | return -1; |
| 2446 | } |
| 2447 | |
| 2448 | /** |
| 2449 | * Returns the index of a specified tab. |
no test coverage detected