From 5c978418d543d34dae48a7c8f103c4623743ea44 Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Wed, 20 Dec 2017 18:40:31 +0000 Subject: [PATCH] JAL-2874 made the actionlistener slightly clearer --- src/jalview/ext/archaeopteryx/AptxFrame.java | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/jalview/ext/archaeopteryx/AptxFrame.java b/src/jalview/ext/archaeopteryx/AptxFrame.java index 79798d3..92d2da2 100644 --- a/src/jalview/ext/archaeopteryx/AptxFrame.java +++ b/src/jalview/ext/archaeopteryx/AptxFrame.java @@ -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(); } -- 1.7.10.2