From edf34f58d16e4fa687d4b8ed5d83513178da1387 Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Wed, 6 Dec 2017 16:07:42 +0000 Subject: [PATCH] JAL-2794 disabled branch colors on selection for now --- src/jalview/ext/archaeopteryx/JalviewBinding.java | 24 +++++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/jalview/ext/archaeopteryx/JalviewBinding.java b/src/jalview/ext/archaeopteryx/JalviewBinding.java index eca66ae..41d18f5 100644 --- a/src/jalview/ext/archaeopteryx/JalviewBinding.java +++ b/src/jalview/ext/archaeopteryx/JalviewBinding.java @@ -58,6 +58,8 @@ import org.forester.phylogeny.data.BranchColor; public final class JalviewBinding implements ExternalTreeViewerBindingI { + private final MainFrame aptxFrame; + private org.forester.archaeopteryx.TreePanel treeView; private AlignmentViewport parentAvport; @@ -107,10 +109,11 @@ public final class JalviewBinding MessageManager.getString("label.tabs_detected_archaeopteryx"), MessageManager.getString("label.problem_reading_tree_file"), JvOptionPane.WARNING_MESSAGE); - ; + } // deal with/prohibit null values here as that will cause problems + aptxFrame = archaeopteryx; parentAvport = jalviewAlignmentViewport; sequencesBoundToNodes = alignMappedToNodes; nodesBoundToSequences = nodesMappedToAlign; @@ -121,17 +124,19 @@ public final class JalviewBinding ssm.addSelectionListener(this); treeView.addMouseListener(this); + PaintRefresher.Register(treeView, parentAvport.getSequenceSetId()); associatedPanels = PaintRefresher .getAssociatedPanels(parentAvport.getSequenceSetId()); - archaeopteryx.addInternalFrameListener(new InternalFrameAdapter() + aptxFrame.addInternalFrameListener(new InternalFrameAdapter() { @Override public void internalFrameClosed(InternalFrameEvent e) { - AptxInit.getAllAptxFrames().remove(archaeopteryx); + AptxInit.getAllAptxFrames().remove(aptxFrame); + ssm.removeSelectionListener(JalviewBinding.this); } }); @@ -172,6 +177,8 @@ public final class JalviewBinding @Override public void actionPerformed(ActionEvent e) { + // aptxFrame.actionPerformed(e); + } @Override @@ -245,6 +252,7 @@ public final class JalviewBinding treeView.setFoundNodes0( new HashSet(seqsel.getSequences().size())); + for (SequenceI selectedSequence : seqsel.getSequences()) { PhylogenyNode matchingNode = sequencesBoundToNodes.get(selectedSequence); @@ -255,10 +263,10 @@ public final class JalviewBinding if (!matchingNode.getBranchData().isHasBranchColor()) { - Color foundNodesColour = treeView.getTreeColorSet() - .getFoundColor0(); - matchingNode.getBranchData() - .setBranchColor(new BranchColor(foundNodesColour)); + // Color foundNodesColour = treeView.getTreeColorSet() + // .getFoundColor0(); + // matchingNode.getBranchData() + // .setBranchColor(new BranchColor(foundNodesColour)); } @@ -527,6 +535,8 @@ public final class JalviewBinding @Override public void showMatchingChildSequences(final PhylogenyNode parentNode) { + // redundancy here, Forester already iterates through tree to get all + // descendants List childNodes = PhylogenyMethods .getAllDescendants(parentNode); -- 1.7.10.2