mainFrame.dispose();
}
- private void launchStructureViewer(StructureSelectionManager ssm,
- PDBEntry[] pdbEntriesToView, AlignmentPanel alignPanel,
- SequenceI[] sequences)
+ private void launchStructureViewer(final StructureSelectionManager ssm,
+ final PDBEntry[] pdbEntriesToView,
+ final AlignmentPanel alignPanel, final SequenceI[] sequences)
{
- StructureViewer sViewer = new StructureViewer(ssm);
- if (pdbEntriesToView.length > 1)
+ final StructureViewer sViewer = new StructureViewer(ssm);
+ new Thread(new Runnable()
{
- ArrayList<SequenceI[]> seqsMap = new ArrayList<SequenceI[]>();
- for (SequenceI seq : sequences)
+ public void run()
{
- seqsMap.add(new SequenceI[]
- { seq });
+ if (pdbEntriesToView.length > 1)
+ {
+ ArrayList<SequenceI[]> seqsMap = new ArrayList<SequenceI[]>();
+ for (SequenceI seq : sequences)
+ {
+ seqsMap.add(new SequenceI[]
+ { seq });
+ }
+ SequenceI[][] collatedSeqs = seqsMap.toArray(new SequenceI[0][0]);
+ sViewer.viewStructures(pdbEntriesToView, collatedSeqs, alignPanel);
+ // sViewer.viewStructures(pdbEntriesToView,
+ // alignPanel.av.collateForPDB(pdbEntriesToView),
+ // alignPanel);
+ }
+ else
+ {
+ sViewer.viewStructures(pdbEntriesToView[0], sequences, alignPanel);
+ }
}
- SequenceI[][] collatedSeqs = seqsMap.toArray(new SequenceI[0][0]);
- sViewer.viewStructures(pdbEntriesToView, collatedSeqs,
- alignPanel);
- // sViewer.viewStructures(pdbEntriesToView,
- // alignPanel.av.collateForPDB(pdbEntriesToView),
- // alignPanel);
- }
- else
- {
- sViewer.viewStructures(pdbEntriesToView[0], sequences,
- alignPanel);
- }
+ }).start();
}
/**