From ef6555067c63693c06f0b6335a1c9f5761d712c6 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 21 Jul 2006 09:27:20 +0000 Subject: [PATCH] getViewAsString can ignore sequenceGroup --- src/jalview/gui/AlignFrame.java | 32 +++++++++++++++---------------- src/jalview/gui/AlignViewport.java | 8 +++----- src/jalview/gui/PCAPanel.java | 2 +- src/jalview/gui/PairwiseAlignPanel.java | 2 +- src/jalview/gui/PopupMenu.java | 2 +- src/jalview/gui/RedundancyPanel.java | 2 +- src/jalview/gui/TreePanel.java | 2 +- 7 files changed, 23 insertions(+), 27 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 325a676..2ce8f06 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -359,16 +359,13 @@ public class AlignFrame JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (reply == JOptionPane.YES_OPTION) - omitHidden = viewport.getSelectionAsString(); + omitHidden = viewport.getViewAsString(false); } String output = new FormatAdapter().formatSequences( format, viewport.alignment.getSequencesArray(), - null); - //viewport.getSelectionAsNewSequence(), - //omitHidden) ; - + omitHidden); if (output == null) { @@ -400,12 +397,6 @@ public class AlignFrame */ protected void outputText_actionPerformed(ActionEvent e) { - CutAndPasteTransfer cap = new CutAndPasteTransfer(); - Desktop.addInternalFrame(cap, - "Alignment output - " + e.getActionCommand(), 600, - 500); - - String [] omitHidden = null; if(viewport.hasHiddenColumns) @@ -417,12 +408,20 @@ public class AlignFrame JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if(reply==JOptionPane.YES_OPTION) - omitHidden = viewport.getSelectionAsString(); + { + omitHidden = viewport.getViewAsString(false); + } } + CutAndPasteTransfer cap = new CutAndPasteTransfer(); + Desktop.addInternalFrame(cap, + "Alignment output - " + e.getActionCommand(), 600, + 500); + + cap.setText(new FormatAdapter().formatSequences( e.getActionCommand(), - viewport.getSelectionAsNewSequence(), + viewport.alignment.getSequencesArray(), omitHidden)); } @@ -690,7 +689,7 @@ public class AlignFrame if (viewport.hasHiddenColumns) { - omitHidden = viewport.getSelectionAsString(); + omitHidden = viewport.getViewAsString(true); } String output = new FormatAdapter().formatSequences( @@ -849,7 +848,7 @@ public class AlignFrame for(int i=0; i