change ActionListeners to ItemListeners
authoramwaterhouse <Andrew Waterhouse>
Fri, 20 May 2005 11:01:07 +0000 (11:01 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 20 May 2005 11:01:07 +0000 (11:01 +0000)
src/jalview/appletgui/APopupMenu.java

index 83e4407..91b4c58 100755 (executable)
@@ -85,6 +85,20 @@ public class APopupMenu extends java.awt.PopupMenu
         nucleotideMenuItem_actionPerformed(e);\r
       }\r
     });\r
+    conservationMenuItem.addItemListener(new ItemListener()\r
+    {\r
+      public void itemStateChanged(ItemEvent itemEvent)\r
+      {\r
+        conservationMenuItem_itemStateChanged(itemEvent);\r
+      }\r
+    });\r
+    abovePIDColour.addItemListener(new ItemListener()\r
+    {\r
+      public void itemStateChanged(ItemEvent itemEvent)\r
+      {\r
+        abovePIDColour_itemStateChanged(itemEvent);\r
+      }\r
+    });\r
 \r
     add(groupMenu);\r
     this.add(sequenceMenu);\r
@@ -185,13 +199,7 @@ public class APopupMenu extends java.awt.PopupMenu
       }\r
     });\r
     abovePIDColour.setLabel("Above % Identity");\r
-    abovePIDColour.addActionListener(new java.awt.event.ActionListener()\r
-    {\r
-      public void actionPerformed(ActionEvent e)\r
-      {\r
-        abovePIDColour_actionPerformed(e);\r
-      }\r
-    });\r
+\r
     userDefinedColour.setLabel("User Defined");\r
     userDefinedColour.addActionListener(new java.awt.event.ActionListener()\r
     {\r
@@ -217,14 +225,6 @@ public class APopupMenu extends java.awt.PopupMenu
       }\r
     });\r
     conservationMenuItem.setLabel("Conservation");\r
-   conservationMenuItem.addActionListener(new java.awt.event.ActionListener()\r
-   {\r
-     public void actionPerformed(ActionEvent e)\r
-     {\r
-       conservationMenuItem_actionPerformed(e);\r
-     }\r
-   });\r
-\r
 \r
 \r
   }\r
@@ -297,7 +297,7 @@ public class APopupMenu extends java.awt.PopupMenu
 \r
 \r
 \r
-  protected void abovePIDColour_actionPerformed(ActionEvent e)\r
+  protected void abovePIDColour_itemStateChanged(ItemEvent ie)\r
   {\r
     SequenceGroup sg = getGroup();\r
     if (abovePIDColour.getState())\r
@@ -355,7 +355,7 @@ public class APopupMenu extends java.awt.PopupMenu
     refresh();\r
   }\r
 \r
-  protected  void conservationMenuItem_actionPerformed(ActionEvent e)\r
+  protected  void conservationMenuItem_itemStateChanged(ItemEvent ie)\r
   {\r
     SequenceGroup sg = getGroup();\r
 \r