X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAppletFormatAdapter.java;h=9a4e9823ce1999d4054e8447502679f7d3c4a81d;hb=265e81c0b3599a09c312f17188e3a892e9d96c4e;hp=00fcb9c39c598d12dc6d285b5b9720bb080ba129;hpb=57738a1f3c19b1c3a00bd3ac5108f8cd0af32f99;p=jalview.git diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index 00fcb9c..9a4e982 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -20,6 +20,10 @@ */ 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; @@ -34,11 +38,6 @@ 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 @@ -159,13 +158,16 @@ 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, + StructureImportSettings.TFType tempfacType) throws IOException + { this.selectedFile = selectedFile; - if (selectedFile != null) - { - this.inFile = selectedFile.getPath(); - } - this.inFile = file; + this.inFile = selectedFile != null ? selectedFile.getPath() : file; try { if (fileFormat.isStructureFile()) @@ -177,11 +179,16 @@ public class AppletFormatAdapter .toString()); StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); + if (tempfacType != null) + { + StructureImportSettings.setTemperatureFactorType(tempfacType); + } if (isParseWithJMOL) { // needs a File option alignFile = new JmolParser( - selectedFile == null ? inFile : selectedFile, sourceType); + selectedFile == null ? inFile : selectedFile, sourceType, + StructureImportSettings.getTemperatureFactorType()); } else {