JAL-1553 added applet support for the select-column-by-annotation-row feature
[jalview.git] / src / jalview / appletgui / AlignFrame.java
index 9fb91ed..dbdc23f 100644 (file)
@@ -23,8 +23,8 @@ package jalview.appletgui;
 import jalview.analysis.AlignmentSorter;
 import jalview.api.AlignViewControllerGuiI;
 import jalview.api.AlignViewControllerI;
-import jalview.api.SequenceStructureBinding;
 import jalview.api.FeatureRenderer;
+import jalview.api.SequenceStructureBinding;
 import jalview.bin.JalviewLite;
 import jalview.commands.CommandI;
 import jalview.commands.EditCommand;
@@ -91,9 +91,7 @@ import java.io.IOException;
 import java.net.URL;
 import java.net.URLEncoder;
 import java.util.Arrays;
-import java.util.Enumeration;
 import java.util.Hashtable;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
@@ -1108,6 +1106,10 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     {
       new AnnotationColourChooser(viewport, alignPanel);
     }
+    else if (source == annotationColumnSelection)
+    {
+      new AnnotationColumnChooser(viewport, alignPanel);
+    }
     else if (source == sortPairwiseMenuItem)
     {
       sortPairwiseMenuItem_actionPerformed();
@@ -2328,7 +2330,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
             && (fr = alignPanel.getFeatureRenderer()) != null)
     {
       
-      fr.setGroupVisibility((List)Arrays.asList(groups), state);
+      fr.setGroupVisibility(Arrays.asList(groups), state);
       alignPanel.seqPanel.seqCanvas.repaint();
       if (alignPanel.overviewPanel != null)
       {
@@ -3275,6 +3277,10 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     annotationColour.setLabel(MessageManager
             .getString("action.by_annotation"));
     annotationColour.addActionListener(this);
+
+    annotationColumnSelection.setLabel("Select by Annotation");
+    annotationColumnSelection.addActionListener(this);
+
     invertSequenceMenuItem.setLabel(MessageManager
             .getString("action.invert_sequence_selection"));
     invertColSel.setLabel(MessageManager
@@ -3463,6 +3469,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     selectMenu.add(unGroup);
     selectMenu.add(grpsFromSelection);
     selectMenu.add(deleteGroups);
+    selectMenu.add(annotationColumnSelection);
 
   }
 
@@ -3477,6 +3484,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
 
   MenuItem annotationColour = new MenuItem();
 
+  MenuItem annotationColumnSelection = new MenuItem();
+
   MenuItem invertColSel = new MenuItem();
 
   Menu menu1 = new Menu();