/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
import jalview.structure.StructureSelectionManager;
import jalview.util.MessageManager;
-import java.util.List;
import java.util.StringTokenizer;
import java.util.Vector;
// open a new source and read from it
FormatAdapter fa = new FormatAdapter();
al = fa.readFile(file, protocol, format);
- source = fa.afile; // keep reference for later if necessary.
+ source = fa.getAlignFile(); // keep reference for later if necessary.
}
} catch (java.io.IOException ex)
{
}
if (sq.getPDBId() != null)
{
- for (PDBEntry pdbe : (List<PDBEntry>) sq.getPDBId())
+ for (PDBEntry pdbe : sq.getPDBId())
{
StructureSelectionManager.getStructureSelectionManager(
Desktop.instance).registerPDBEntry(pdbe);
}
if (viewport != null)
{
- // TODO: create undo object for this JAL-1101
- for (int i = 0; i < al.getHeight(); i++)
- {
- viewport.getAlignment().addSequence(al.getSequenceAt(i));
- }
- viewport.firePropertyChange("alignment", null, viewport
- .getAlignment().getSequences());
+ viewport.addAlignment(al, title);
}
else
{
}
if (source instanceof HtmlFile)
{
- ((HtmlFile) source).LoadAlignmentFeatures(alignFrame);
-
+ ((HtmlFile) source).applySettingsToAlignFrame(alignFrame);
}
+ else if (source instanceof JSONFile)
+ {
+ ((JSONFile) source).applySettingsToAlignFrame(alignFrame);
+ }
+
if (raiseGUI)
{
// add the window to the GUI