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();
 }
 public void restoreSelection() {
   if (mySavedSelection != null) {
     TableUtil.selectRows(myTable, mySavedSelection);
     mySavedSelection = null;
   }
 }