public void setAllElementsMarked(boolean marked) {
   final int[] rows = new int[myTableModel.getRowCount()];
   for (int idx = 0; idx < rows.length; idx++) {
     rows[idx] = idx;
   }
   myTableModel.setMarked(rows, marked);
 }
 public void markElements(Collection<T> elements) {
   myTableModel.setMarked(getElementsRows(elements), true);
 }
 /**
  * Check if element is marked
  *
  * @param element an element to test
  * @param marked a new value of mark.
  */
 public void setElementMarked(T element, boolean marked) {
   final int elementRow = myTableModel.getElementRow(element);
   myTableModel.setMarked(elementRow, marked);
 }