public @NotNull List<T> getSelectedElements() {
    final List<T> elements = new ArrayList<>();
    int[] viewRows = myTable.getSelectedRows();
    for (int viewRow : viewRows) {
      if (viewRow < 0) {
        continue;
      }
      int modelRow = myTable.convertRowIndexToModel(viewRow);
      elements.add(myTableModel.getElementAt(modelRow));
    }
    return elements;
  }
public @NotNull List<T> getSelectedElements()