コード例 #1
0
 public void selectElements(Collection<? extends T> elements) {
   if (elements.size() == 0) {
     myTable.clearSelection();
     return;
   }
   final int[] rows = getElementsRows(elements);
   TableUtil.selectRows(myTable, rows);
   TableUtil.scrollSelectionToVisible(myTable);
   myTable.requestFocus();
 }
コード例 #2
0
 public void restoreSelection() {
   if (mySavedSelection != null) {
     TableUtil.selectRows(myTable, mySavedSelection);
     mySavedSelection = null;
   }
 }