Search in sources :

Example 1 with TableSorter

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);
}
Also used : TableSorter(com.sun.java.TableSorter) JScrollPane(javax.swing.JScrollPane) ProbeList(uk.ac.babraham.SeqMonk.DataTypes.Probes.ProbeList) JTable(javax.swing.JTable) Vector(java.util.Vector)

Aggregations

TableSorter (com.sun.java.TableSorter)1 Vector (java.util.Vector)1 JScrollPane (javax.swing.JScrollPane)1 JTable (javax.swing.JTable)1 ProbeList (uk.ac.babraham.SeqMonk.DataTypes.Probes.ProbeList)1