Returns the paths (inclusive) between the specified rows. If the specified indices are within the viewable set of rows, or bound the viewable set of rows, then the indices are constrained by the viewable set of rows. If the specified indices are not within the viewable set of rows, or do not bound t
(int index0, int index1)
| 2510 | * @return the paths (inclusive) between the specified row indices |
| 2511 | */ |
| 2512 | protected TreePath[] getPathBetweenRows(int index0, int index1) { |
| 2513 | TreeUI tree = getUI(); |
| 2514 | if (tree != null) { |
| 2515 | int rowCount = getRowCount(); |
| 2516 | if (rowCount > 0 && !((index0 < 0 && index1 < 0) || |
| 2517 | (index0 >= rowCount && index1 >= rowCount))){ |
| 2518 | index0 = Math.min(rowCount - 1, Math.max(index0, 0)); |
| 2519 | index1 = Math.min(rowCount - 1, Math.max(index1, 0)); |
| 2520 | int minIndex = Math.min(index0, index1); |
| 2521 | int maxIndex = Math.max(index0, index1); |
| 2522 | TreePath[] selection = new TreePath[ |
| 2523 | maxIndex - minIndex + 1]; |
| 2524 | for(int counter = minIndex; counter <= maxIndex; counter++) { |
| 2525 | selection[counter - minIndex] = |
| 2526 | tree.getPathForRow(this, counter); |
| 2527 | } |
| 2528 | return selection; |
| 2529 | } |
| 2530 | } |
| 2531 | return new TreePath[0]; |
| 2532 | } |
| 2533 | |
| 2534 | /** |
| 2535 | * Selects the rows in the specified interval (inclusive). If |
no test coverage detected