*/
package jalview.io;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import javax.swing.JOptionPane;
-import javax.swing.SwingUtilities;
-
import jalview.api.ComplexAlignFile;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.ColumnSelection;
import jalview.structure.StructureSelectionManager;
import jalview.util.MessageManager;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import javax.swing.JOptionPane;
+import javax.swing.SwingUtilities;
+
public class FileLoader implements Runnable
{
String file;
if ((al != null) && (al.getHeight() > 0))
{
+ // construct and register dataset sequences
for (SequenceI sq : al.getSequences())
{
while (sq.getDatasetSequence() != null)
{
for (PDBEntry pdbe : sq.getPDBId())
{
+ // register PDB entries with desktop's structure selection
+ // manager
StructureSelectionManager.getStructureSelectionManager(
Desktop.instance).registerPDBEntry(pdbe);
}
}
}
+
if (viewport != null)
{
+ // append to existing alignment
viewport.addAlignment(al, title);
}
else
ColourSchemeI cs = ((ComplexAlignFile) source)
.getColourScheme();
alignFrame = new AlignFrame(al, hiddenSeqs, colSel,
- AlignFrame.DEFAULT_WIDTH,
- AlignFrame.DEFAULT_HEIGHT);
+ AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
alignFrame.getViewport().setShowSequenceFeatures(
showSeqFeatures);