JAL-1775 FileLoader javadoc
authorJim Procter <jprocter@issues.jalview.org>
Mon, 15 Jun 2015 13:03:07 +0000 (14:03 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 15 Jun 2015 13:03:07 +0000 (14:03 +0100)
src/jalview/io/FileLoader.java

index 76bd572..0cd2987 100755 (executable)
  */
 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;
@@ -39,6 +33,12 @@ import jalview.schemes.ColourSchemeI;
 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;
@@ -317,6 +317,7 @@ public class FileLoader implements Runnable
 
         if ((al != null) && (al.getHeight() > 0))
         {
+          // construct and register dataset sequences
           for (SequenceI sq : al.getSequences())
           {
             while (sq.getDatasetSequence() != null)
@@ -327,13 +328,17 @@ public class FileLoader implements Runnable
             {
               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
@@ -351,8 +356,7 @@ public class FileLoader implements Runnable
               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);