Selects the nodes corresponding to each of the specified rows in the display. If a particular element of rows is < 0 or >= getRowCount , it will be ignored. If none of the elements in rows are valid rows, the selection will be cleared. That is it will be a
(int[] rows)
| 1724 | * where 0 indicates the first row in the display |
| 1725 | */ |
| 1726 | public void setSelectionRows(int[] rows) { |
| 1727 | TreeUI ui = getUI(); |
| 1728 | |
| 1729 | if(ui != null && rows != null) { |
| 1730 | int numRows = rows.length; |
| 1731 | TreePath[] paths = new TreePath[numRows]; |
| 1732 | |
| 1733 | for(int counter = 0; counter < numRows; counter++) { |
| 1734 | paths[counter] = ui.getPathForRow(this, rows[counter]); |
| 1735 | } |
| 1736 | setSelectionPaths(paths); |
| 1737 | } |
| 1738 | } |
| 1739 | |
| 1740 | /** |
| 1741 | * Adds the node identified by the specified <code>TreePath</code> |
no test coverage detected