@Override
 public void runClasspathPanelAction(Runnable action) {
   try {
     disableModelUpdate();
     action.run();
   } finally {
     enableModelUpdate();
     myEntryTable.requestFocus();
   }
 }
 public void selectElements(Collection<? extends Module> elements) {
   if (elements.size() == 0) {
     myTable.clearSelection();
     return;
   }
   final int[] rows = getElementsRows(elements);
   TableUtil.selectRows(myTable, rows);
   TableUtil.scrollSelectionToVisible(myTable);
   myTable.requestFocus();
 }
  public void removeModule(Module element) {
    final int elementRow = myTableModel.getElementRow(element);
    if (elementRow < 0) {
      return; // no such element
    }
    final boolean wasSelected = myTable.getSelectionModel().isSelectedIndex(elementRow);

    myTableModel.removeElement(element);

    if (wasSelected) {
      final int rowCount = myTableModel.getRowCount();
      if (rowCount > 0) {
        selectRow(elementRow % rowCount);
      } else {
        myTable.getSelectionModel().clearSelection();
      }
    }
    myTable.requestFocus();
  }
 public void addModule(Module element, String dirName) {
   myTableModel.addElement(element, dirName);
   selectRow(myTableModel.getRowCount() - 1);
   myTable.requestFocus();
 }
 public void addElement(T element, final boolean isMarked, ElementProperties elementProperties) {
   myTableModel.addElement(element, isMarked);
   myElementToPropertiesMap.put(element, elementProperties);
   selectRow(myTableModel.getRowCount() - 1);
   myTable.requestFocus();
 }