public List<Pair<Module, String>> getAllModules() {
   final int count = myTableModel.getRowCount();
   List<Pair<Module, String>> elements = new ArrayList<Pair<Module, String>>();
   for (int idx = 0; idx < count; idx++) {
     final Module module = myTableModel.getModuleAt(idx);
     elements.add(Pair.create(module, myTableModel.getGenDirName(module)));
   }
   return elements;
 }
 public List<Module> getSelectedElements() {
   final List<Module> elements = new ArrayList<Module>();
   final int[] selectedRows = myTable.getSelectedRows();
   for (int selectedRow : selectedRows) {
     if (selectedRow < 0) {
       continue;
     }
     elements.add(myTableModel.getModuleAt(selectedRow));
   }
   return elements;
 }
 public Module getElementAt(int row) {
   return myTableModel.getModuleAt(row);
 }
 @Nullable
 public Module getSelectedElement() {
   final int selectedRow = getSelectedElementRow();
   return selectedRow < 0 ? null : myTableModel.getModuleAt(selectedRow);
 }