JAL-629 implementation of --tempfac options
[jalview.git] / src / jalview / io / AppletFormatAdapter.java
index 5de14a4..8b1525c 100755 (executable)
  */
 package jalview.io;
 
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
 import java.util.Locale;
 
 import jalview.api.AlignExportSettingsI;
 import jalview.api.AlignmentViewPanel;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentAnnotation.TFType;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AlignmentView;
-import jalview.datamodel.SeqDistanceContactMatrix;
 import jalview.datamodel.PDBEntry.Type;
 import jalview.datamodel.SequenceI;
 import jalview.ext.jmol.JmolParser;
 import jalview.structure.StructureImportSettings;
 import jalview.util.Platform;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-
 /**
  * A low level class for alignment and feature IO with alignment formatting
  * methods used by both applet and application for generating flat alignment
@@ -160,6 +159,13 @@ public class AppletFormatAdapter
           DataSourceType sourceType, FileFormatI fileFormat)
           throws IOException
   {
+    return readFile(selectedFile, file, sourceType, fileFormat, null);
+  }
+
+  public AlignmentI readFile(File selectedFile, String file,
+          DataSourceType sourceType, FileFormatI fileFormat,
+          AlignmentAnnotation.TFType tempfacType) throws IOException
+  {
 
     this.selectedFile = selectedFile;
     if (selectedFile != null)
@@ -182,7 +188,8 @@ public class AppletFormatAdapter
         {
           // needs a File option
           alignFile = new JmolParser(
-                  selectedFile == null ? inFile : selectedFile, sourceType);
+                  selectedFile == null ? inFile : selectedFile, sourceType,
+                  tempfacType);
         }
         else
         {