Merge branch 'Release_2_8_2_Branch' of https://source.jalview.org/git/jalview.git...
[jalview.git] / src / jalview / gui / AlignFrame.java
index 2a804ad..50043e6 100644 (file)
@@ -30,6 +30,7 @@ import jalview.analysis.ParseProperties;
 import jalview.analysis.SequenceIdMatcher;
 import jalview.api.AlignViewControllerGuiI;
 import jalview.api.AlignViewControllerI;
+import jalview.api.AlignmentViewPanel;
 import jalview.api.analysis.ScoreModelI;
 import jalview.bin.Cache;
 import jalview.commands.CommandI;
@@ -115,6 +116,7 @@ import java.beans.PropertyChangeEvent;
 import java.io.File;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.List;
@@ -4187,28 +4189,17 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     else if (viewport.getSelectionGroup() != null
             && viewport.getSelectionGroup().getSize() == 1)
     {
-      int option = JOptionPane
-              .showConfirmDialog(
-this,
-                      "More than one sequece group selection is required for this Job, click \n'Cancel' to edit your selection or 'Ok' to submit the entire sequence.",
-                      "Invalid selection",
-                      JOptionPane.OK_CANCEL_OPTION);
+      int option = JOptionPane.showConfirmDialog(this,
+              MessageManager.getString("warn.oneseq_msainput_selection"),
+              MessageManager.getString("label.invalid_selection"),
+              JOptionPane.OK_CANCEL_OPTION);
       if (option == JOptionPane.OK_OPTION)
       {
         msa = viewport.getAlignmentView(false);
       }
-
     }
     else
     {
-      /*
-       * Vector seqs = viewport.getAlignment().getSequences();
-       * 
-       * if (seqs.size() > 1) { msa = new SequenceI[seqs.size()];
-       * 
-       * for (int i = 0; i < seqs.size(); i++) { msa[i] = (SequenceI)
-       * seqs.elementAt(i); } }
-       */
       msa = viewport.getAlignmentView(false);
     }
     return msa;
@@ -5831,6 +5822,15 @@ this,
             .setShowAutocalculatedAbove(isShowAutoCalculatedAbove());
     alignPanel.paintAlignment(true);
   }
+
+  /**
+   * 
+   * @return alignment panels in this alignemnt frame
+   */
+  public List<AlignmentViewPanel> getAlignPanels()
+  {
+    return alignPanels == null ? Arrays.asList(alignPanel) : alignPanels;
+  }
 }
 
 class PrintThread extends Thread