Пример #1
0
  public void delete() {
    int[] selRows = dataTable.getSelectedRows();
    Set<InputFile> dataToRemove = new HashSet<InputFile>();
    for (int row : selRows) {
      dataToRemove.add(document.getInputFiles().get(row));
    }

    // TODO: would probably be a good idea to check if the user wants to remove the last file
    document.getInputFiles().removeAll(dataToRemove);
    document.fireDataChanged();

    if (document.getInputFiles().size() == 0) {
      // all data partitions removed so reset the taxa
      frame.setStatusMessage("No data loaded");
    }
  }
Пример #2
0
 public void editSelection() {
   int selRow = dataTable.getSelectedRow();
   if (selRow >= 0) {
     InputFile inputFile = document.getInputFiles().get(selRow);
     editSettings(inputFile);
   }
 }