Esempio n. 1
0
 public Object getValueAt(int row, int col) {
   //            PartitionData partition = options.getPartitionDataNoSpecies().get(row);
   AbstractPartitionData partition = options.dataPartitions.get(row);
   switch (col) {
     case 0:
       return partition.getName();
     case 1:
       return partition.getFileName();
     case 2:
       return "" + (partition.getTaxonCount() >= 0 ? partition.getTaxonCount() : "-");
     case 3:
       return "" + (partition.getSiteCount() >= 0 ? partition.getSiteCount() : "-");
     case 4:
       return partition.getDataDescription();
     case 5:
       //                    return partition.getPloidyType();
       //                case 6:
       return partition.getPartitionSubstitutionModel().getName();
     case 6:
       return ""
           + (partition.getPartitionClockModel() != null
               ? partition.getPartitionClockModel().getName()
               : "-");
     case 7:
       return partition.getPartitionTreeModel().getName();
     default:
       throw new IllegalArgumentException("unknown column, " + col);
   }
 }
Esempio n. 2
0
  public void unlinkModels() {
    int[] selRows = dataTable.getSelectedRows();
    for (int row : selRows) {
      AbstractPartitionData partition = options.dataPartitions.get(row);

      PartitionSubstitutionModel model = partition.getPartitionSubstitutionModel();
      if (!model.getName().equals(partition.getName())) {
        PartitionSubstitutionModel newModel =
            new PartitionSubstitutionModel(options, partition.getName(), model);
        partition.setPartitionSubstitutionModel(newModel);
      }
    }

    modelsChanged();

    fireDataChanged();
    repaint();
  }