JAL-2874 made the actionlistener slightly clearer
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Wed, 20 Dec 2017 18:40:31 +0000 (18:40 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Wed, 20 Dec 2017 18:40:31 +0000 (18:40 +0000)
src/jalview/ext/archaeopteryx/AptxFrame.java

index 79798d3..92d2da2 100644 (file)
@@ -5,6 +5,7 @@ import jalview.ext.treeviewer.TreeControlsI;
 import jalview.ext.treeviewer.TreeFrameI;
 import jalview.ext.treeviewer.TreeI;
 import jalview.ext.treeviewer.TreePanelI;
+import jalview.ext.treeviewer.TreeViewerBindingI;
 import jalview.ext.treeviewer.TreeViewerUtils;
 import jalview.gui.Desktop;
 import jalview.gui.EPSOptions;
@@ -43,6 +44,8 @@ public class AptxFrame implements TreeFrameI
 {
   private final MainFrame aptxFrame;
 
+
+
   private TreePanelI aptxPanel;
 
   private TreeControlsI aptxControls;
@@ -147,16 +150,25 @@ public class AptxFrame implements TreeFrameI
                 "Filter alignment to show only currently visible sequences");
 
         refreshJalview.setFont(menu.getFont());
-        refreshJalview.addActionListener(
-                TreeViewerUtils.getActiveTreeViews().get(this));
+        refreshJalview.addActionListener(new ActionListener() {
+          
+          @Override
+          public void actionPerformed(ActionEvent e) {
+            TreeViewerBindingI bindingManager = TreeViewerUtils
+                    .getActiveTreeViews().get(AptxFrame.this);
+            bindingManager.actionPerformed(e);
+          }
+        });
+                
         sortByTree.addActionListener(new ActionListener()
         {
 
           @Override
           public void actionPerformed(ActionEvent e)
           {
-            TreeViewerUtils.getActiveTreeViews().get(AptxFrame.this)
-                    .sortByTree_actionPerformed();
+            TreeViewerBindingI bindingManager = TreeViewerUtils
+                    .getActiveTreeViews().get(AptxFrame.this);
+            bindingManager.sortByTree_actionPerformed();
 
           }