From: jprocter Date: Tue, 2 Oct 2007 16:05:40 +0000 (+0000) Subject: added colSel as a parameter formatAdaptor print function to allow editing of annotati... X-Git-Tag: Release_2_4~253 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8cf069b967632cb55cc1a7e4799e677b0fa36101;p=jalview.git added colSel as a parameter formatAdaptor print function to allow editing of annotation embedded in output. --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 1795c1a..05beb00 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -781,7 +781,7 @@ public class AlignFrame String output = f.formatSequences( format, (Alignment) viewport.alignment, // class cast exceptions will occur in the distant future - omitHidden, f.getCacheSuffixDefault(format)); + omitHidden, f.getCacheSuffixDefault(format), viewport.colSel); if (output == null) { @@ -853,7 +853,7 @@ public class AlignFrame cap.setText(new FormatAdapter().formatSequences( e.getActionCommand(), viewport.alignment, - omitHidden)); + omitHidden, viewport.colSel)); } /** diff --git a/src/jalview/io/FormatAdapter.java b/src/jalview/io/FormatAdapter.java index 6c40696..24c9109 100755 --- a/src/jalview/io/FormatAdapter.java +++ b/src/jalview/io/FormatAdapter.java @@ -139,19 +139,20 @@ public class FormatAdapter return jalview.bin.Cache.getDefault(format.toUpperCase()+"_JVSUFFIX", true); return false; } - public String formatSequences(String format, AlignmentI alignment, String[] omitHidden) + public String formatSequences(String format, AlignmentI alignment, String[] omitHidden, ColumnSelection colSel) { - return formatSequences(format, alignment, omitHidden, getCacheSuffixDefault(format)); + return formatSequences(format, alignment, omitHidden, getCacheSuffixDefault(format), colSel); } /** * hack function to replace seuqences with visible sequence strings before generating a * string of the alignment in the given format. * @param format - * @param alignment - * @param omitHidden sequence strings to write out in order of sequences in alignment + * @param alignment + * @param omitHidden sequence strings to write out in order of sequences in alignment + * @param colSel defines hidden columns that are edited out of annotation * @return string representation of the alignment formatted as format */ - public String formatSequences(String format, AlignmentI alignment, String[] omitHidden, boolean suffix) + public String formatSequences(String format, AlignmentI alignment, String[] omitHidden, boolean suffix, ColumnSelection colSel) { AlignFile afile = null; if (omitHidden!=null) @@ -161,7 +162,9 @@ public class FormatAdapter AlignmentAnnotation[] ala = alignment.getAlignmentAnnotation(); for (int i=0; i