X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAppletFormatAdapter.java;h=02de02e0580939ed9626b62d3e1617ae0bd4d6a6;hb=6897b5d861a256c94b23167254c3f4e2ab6acb3a;hp=b235bcc5e80ec25680427b9906e5d5125cc361a0;hpb=6dd554fdbf34db6b79595d5027159d20225f4894;p=jalview.git diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index b235bcc..02de02e 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -26,7 +26,6 @@ import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.AlignmentView; -import jalview.gui.AlignmentPanel; import jalview.util.MessageManager; import java.io.File; @@ -146,7 +145,7 @@ public class AppletFormatAdapter this.viewpanel = viewpanel; } - public AppletFormatAdapter(AlignmentPanel alignPanel, + public AppletFormatAdapter(AlignmentViewPanel alignPanel, AlignExportSettingI settings) { viewpanel = alignPanel; @@ -206,6 +205,10 @@ public class AppletFormatAdapter public static final boolean isValidFormat(String format, boolean forwriting) { + if (format == null) + { + return false; + } boolean valid = false; String[] format_list = (forwriting) ? WRITEABLE_FORMATS : READABLE_FORMATS; @@ -484,7 +487,7 @@ public class AppletFormatAdapter private AlignmentI buildAlignmentFrom(AlignFile alignFile2) { // Standard boilerplate for creating alignment from parser - alignFile.configureForView(viewpanel); + // alignFile.configureForView(viewpanel); AlignmentI al = new Alignment(alignFile.getSeqsAsArray()); @@ -520,7 +523,7 @@ public class AppletFormatAdapter aselview.addAnnotation(aa); } } - + viewpanel = ap; return formatSequences(format, aselview, jvsuffix); } @@ -598,11 +601,10 @@ public class AppletFormatAdapter { throw new Exception(MessageManager.getString("error.implementation_error_unknown_file_format_string")); } + afile.setNewlineString(newline); afile.addJVSuffix(jvsuffix); - afile.setExportSettings(exportSettings); - afile.configureForView(viewpanel); // check whether we were given a specific alignment to export, rather than