JAL-2629 add sort by evalue and bit score
[jalview.git] / src / jalview / jbgui / GAlignFrame.java
index f650707..579da08 100755 (executable)
@@ -518,6 +518,26 @@ public class GAlignFrame extends JInternalFrame
         sortGroupMenuItem_actionPerformed(e);
       }
     });
+    JMenuItem sortEValueMenuItem = new JMenuItem(
+            MessageManager.getString("action.by_evalue"));
+    sortEValueMenuItem.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        sortEValueMenuItem_actionPerformed(e);
+      }
+    });
+    JMenuItem sortBitScoreMenuItem = new JMenuItem(
+            MessageManager.getString("action.by_bit_score"));
+    sortBitScoreMenuItem.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        sortBitScoreMenuItem_actionPerformed(e);
+      }
+    });
   
     JMenuItem removeRedundancyMenuItem = new JMenuItem(
             MessageManager.getString("action.remove_redundancy"));
@@ -532,6 +552,30 @@ public class GAlignFrame extends JInternalFrame
       }
     };
     addMenuActionAndAccelerator(keyStroke, removeRedundancyMenuItem, al);
+
+    JMenuItem filterByEValue = new JMenuItem(
+            MessageManager.getString("action.filter_by_evalue"));
+    filterByEValue.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        filterByEValue_actionPerformed();
+      }
+
+    });
+
+    JMenuItem filterByScore = new JMenuItem(
+            MessageManager.getString("action.filter_by_score"));
+    filterByScore.addActionListener(new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        filterByScore_actionPerformed();
+      }
+
+    });
   
     JMenuItem pairwiseAlignmentMenuItem = new JMenuItem(
             MessageManager.getString("action.pairwise_alignment"));
@@ -1744,6 +1788,18 @@ public class GAlignFrame extends JInternalFrame
         selectHighlightedColumns_actionPerformed(actionEvent);
       }
     };
+    JMenuItem Filter = new JMenuItem(
+            MessageManager.getString("action.select_highlighted_columns"));
+    selectHighlighted.setToolTipText(
+            MessageManager.getString("tooltip.select_highlighted_columns"));
+    al = new ActionListener()
+    {
+      @Override
+      public void actionPerformed(ActionEvent actionEvent)
+      {
+        selectHighlightedColumns_actionPerformed(actionEvent);
+      }
+    };
     selectHighlighted.addActionListener(al);
     JMenu tooltipSettingsMenu = new JMenu(
             MessageManager.getString("label.sequence_id_tooltip"));
@@ -1805,6 +1861,9 @@ public class GAlignFrame extends JInternalFrame
     // editMenu.add(justifyRightMenuItem);
     // editMenu.addSeparator();
     editMenu.add(padGapsMenuitem);
+    editMenu.addSeparator();
+    editMenu.add(filterByEValue);
+    editMenu.add(filterByScore);
   
     showMenu.add(showAllColumns);
     showMenu.add(showAllSeqs);
@@ -1860,6 +1919,8 @@ public class GAlignFrame extends JInternalFrame
     sort.add(sortLengthMenuItem);
     sort.add(sortGroupMenuItem);
     sort.add(sortPairwiseMenuItem);
+    sort.add(sortEValueMenuItem);
+    sort.add(sortBitScoreMenuItem);
     sort.add(sortByTreeMenu);
     calculateMenu.add(sort);
     calculateMenu.add(calculateTree);
@@ -2505,6 +2566,14 @@ public class GAlignFrame extends JInternalFrame
   {
   }
 
+  protected void sortEValueMenuItem_actionPerformed(ActionEvent e)
+  {
+  }
+
+  protected void sortBitScoreMenuItem_actionPerformed(ActionEvent e)
+  {
+  }
+
   protected void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
   {
   }
@@ -2656,6 +2725,14 @@ public class GAlignFrame extends JInternalFrame
   {
   }
 
+  protected void filterByEValue_actionPerformed()
+  {
+  }
+
+  protected void filterByScore_actionPerformed()
+  {
+  }
+
   protected void scaleRight_actionPerformed(ActionEvent e)
   {
   }