X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignFrame.java;h=14bf680152cf531a5830cb72e69725f6b4ac20ac;hb=3596077c79b7aa2051b9aaa978481004b513101c;hp=cc57961160589c5068f7df08939f9a45573cb9ef;hpb=3f8dab9bfe7202a4a83a86052bcfe18f12f138a2;p=jalview.git diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index cc57961..14bf680 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -60,16 +60,14 @@ public class AlignFrame Stack redoList = new Stack(); private int treeCount = 0; - /** - * Creates a new AlignFrame object. - * - * @param al DOCUMENT ME! + * new alignment window with hidden columns + * @param al AlignmentI + * @param hiddenColumns ColumnSelection or null */ - public AlignFrame(AlignmentI al) - { + public AlignFrame(AlignmentI al, ColumnSelection hiddenColumns) { - viewport = new AlignViewport(al); + viewport = new AlignViewport(al, hiddenColumns); this.setDropTarget(new java.awt.dnd.DropTarget(this, this)); @@ -141,6 +139,17 @@ public class AlignFrame } + + /** + * Creates a new AlignFrame object. + * + * @param al DOCUMENT ME! + */ + public AlignFrame(AlignmentI al) + { + this(al, null); + } + public AlignViewport getViewport() { return viewport; @@ -784,7 +793,6 @@ public class AlignFrame if (newAlignment) { - System.out.println(format +" 2"); alignment = new Alignment(sequences); if(Desktop.jalviewClipboard!=null) @@ -795,7 +803,6 @@ public class AlignFrame } else { - System.out.println(format +" 24"); alignment = viewport.getAlignment(); //!newAlignment @@ -2200,6 +2207,9 @@ public class AlignFrame return; } + if(viewport.alignment.getHeight()<2) + return; + tp = new TreePanel(viewport, type, pwType); } @@ -2288,27 +2298,28 @@ public class AlignFrame * or just the selected set will be submitted for multiple alignment. * */ - private SequenceI[] gatherSequencesForAlignment() + private jalview.datamodel.AlignmentView gatherSequencesForAlignment() { // Now, check we have enough sequences - SequenceI[] msa = null; + AlignmentView msa = null; if ( (viewport.getSelectionGroup() != null) && (viewport.getSelectionGroup().getSize(false) > 1)) { // JBPNote UGLY! To prettify, make SequenceGroup and Alignment conform to some common interface! - SequenceGroup seqs = viewport.getSelectionGroup(); + /*SequenceGroup seqs = viewport.getSelectionGroup(); int sz; msa = new SequenceI[sz = seqs.getSize(false)]; for (int i = 0; i < sz; i++) { msa[i] = (SequenceI) seqs.getSequenceAt(i); - } + } */ + msa = viewport.getAlignmentView(true); } else { - Vector seqs = viewport.getAlignment().getSequences(); + /*Vector seqs = viewport.getAlignment().getSequences(); if (seqs.size() > 1) { @@ -2318,7 +2329,8 @@ public class AlignFrame { msa[i] = (SequenceI) seqs.elementAt(i); } - } + }*/ + msa = viewport.getAlignmentView(false); } return msa; } @@ -2522,7 +2534,7 @@ public class AlignFrame { public void actionPerformed(ActionEvent e) { - SequenceI[] msa = gatherSequencesForAlignment(); + AlignmentView msa = gatherSequencesForAlignment(); new jalview.ws.MsaWSClient(sh, title, msa, false, true, viewport.getAlignment().getDataset(), af); @@ -2539,7 +2551,7 @@ public class AlignFrame { public void actionPerformed(ActionEvent e) { - SequenceI[] msa = gatherSequencesForAlignment(); + AlignmentView msa = gatherSequencesForAlignment(); new jalview.ws.MsaWSClient(sh, title, msa, true, true, viewport.getAlignment().getDataset(), af);