public Object getValueAt(int row, int col) { // PartitionData partition = options.getPartitionDataNoSpecies().get(row); PartitionData partition = options.getNonTraitsDataList().get(row); switch (col) { case 0: return partition.getName(); case 1: return partition.getFileName(); case 2: return "" + partition.getTaxaCount(); case 3: return "" + partition.getSiteCount(); // sequence length case 4: return partition.getDataType(); case 5: // return partition.getPloidyType(); // case 6: return partition.getPartitionSubstitutionModel().getName(); case 6: return partition.getPartitionClockModel().getName(); case 7: return partition.getPartitionTreeModel().getName(); default: throw new IllegalArgumentException("unknown column, " + col); } }
public void unlinkClocks() { // reuse previous PartitionTreePrior int[] selRows = dataTable.getSelectedRows(); for (int row : selRows) { PartitionData partition = options.dataPartitions.get(row); PartitionClockModel model = partition.getPartitionClockModel(); if (!model.getName().equals(partition.getName())) { PartitionClockModel newModel = new PartitionClockModel(options, partition); partition.setPartitionClockModel(newModel); } } modelsChanged(); fireDataChanged(); repaint(); }