use of com.sun.java.TableSorter in project SeqMonk by s-andrews.
the class SimilarProbeListsDialog method run.
public void run() {
Vector<ProbeListHit> tempHits = new Vector<SimilarProbeListsDialog.ProbeListHit>();
ProbeList topList = startingList;
while (topList.parent() != null) {
topList = topList.parent();
}
ProbeList[] allLists = topList.getAllProbeLists();
for (int l = 0; l < allLists.length; l++) {
progressDialog.progressUpdated("Processed " + l + " out of " + allLists.length + " lists", l, allLists.length);
// We know we're similar to ourself!
if (allLists[l] == startingList)
continue;
int overlap = getOverlap(startingList, allLists[l]);
if (overlap > 0) {
tempHits.add(new ProbeListHit(allLists[l], overlap));
}
}
hits = tempHits.toArray(new ProbeListHit[0]);
progressDialog.progressComplete("", null);
setLocationRelativeTo(SeqMonkApplication.getInstance());
TableSorter model = new TableSorter(new HitListModel());
table = new JTable(model);
model.setTableHeader(table.getTableHeader());
table.addMouseListener(this);
table.setColumnSelectionAllowed(false);
table.setCellSelectionEnabled(true);
getContentPane().add(new JScrollPane(table), BorderLayout.CENTER);
validate();
setVisible(true);
}
Aggregations