From: kjvdheide Date: Tue, 14 Nov 2017 15:28:56 +0000 (+0000) Subject: JAL-2805 interface comments, progress on associating leaves X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8125e94752b7117af960311bb200d8f1f3c2be73;p=jalview.git JAL-2805 interface comments, progress on associating leaves --- diff --git a/src/jalview/ext/archaeopteryx/AptxBinding.java b/src/jalview/ext/archaeopteryx/AptxBinding.java index 00462aa..d82f660 100644 --- a/src/jalview/ext/archaeopteryx/AptxBinding.java +++ b/src/jalview/ext/archaeopteryx/AptxBinding.java @@ -132,11 +132,7 @@ public final class AptxBinding } - /** - * If a node is selected in the tree panel this method highlights the - * corresponding sequence in the Jalview alignment view. If an internal node - * is selected all child sequences get highlighted as well. - */ + @Override public void showNodeSelectionOnAlign(final MouseEvent e) { @@ -144,8 +140,8 @@ public final class AptxBinding if (node != null) { if ((e.getModifiers() & InputEvent.SHIFT_MASK) == 0) // clear previous - // selection if shift - // IS NOT pressed + // selection if shift + // IS NOT pressed { parentAvport.setSelectionGroup(null); } @@ -153,12 +149,11 @@ public final class AptxBinding if (node.isInternal()) { showMatchingChildSequences(node); - } + else { showMatchingSequence(node); - } } diff --git a/src/jalview/ext/archaeopteryx/AptxNodeAssociation.java b/src/jalview/ext/archaeopteryx/AptxNodeAssociation.java index ec7ca27..32ca883 100644 --- a/src/jalview/ext/archaeopteryx/AptxNodeAssociation.java +++ b/src/jalview/ext/archaeopteryx/AptxNodeAssociation.java @@ -2,6 +2,7 @@ package jalview.ext.archaeopteryx; import jalview.analysis.SequenceIdMatcher; import jalview.datamodel.SequenceI; +import jalview.ext.forester.ForesterDataConversions; import java.util.ArrayList; import java.util.List; @@ -48,7 +49,7 @@ public class AptxNodeAssociation SequenceI nodeSequence; String nodeSequenceName; List one2many = new ArrayList<>(); - // int countOne2Many = 0; + int countOne2Many = 0; for (PhylogenyNode treeNode : leaves) { @@ -62,11 +63,12 @@ public class AptxNodeAssociation if (nodeSequence != null) { + org.forester.phylogeny.data.Sequence foresterNodeSeq = ForesterDataConversions.createForesterSequence(nodeSequence, true); - //treeNode.setElement(nodeSequence); + treeNode.getNodeData().setSequence(foresterNodeSeq); if (one2many.contains(nodeSequence)) { - // countOne2Many++; + countOne2Many++; if (jalview.bin.Cache.log.isDebugEnabled()) { jalview.bin.Cache.log.debug("One 2 many relationship for" diff --git a/src/jalview/ext/archaeopteryx/ExternalTreeViewerBindingI.java b/src/jalview/ext/archaeopteryx/ExternalTreeViewerBindingI.java index c9f5820..2a807a3 100644 --- a/src/jalview/ext/archaeopteryx/ExternalTreeViewerBindingI.java +++ b/src/jalview/ext/archaeopteryx/ExternalTreeViewerBindingI.java @@ -42,6 +42,11 @@ interface ExternalTreeViewerBindingI extends ActionListener, MouseListener, SelectionListener, SelectionSource { + /** + * If a node is selected in the tree panel this method highlights the + * corresponding sequence in the Jalview alignment view. If an internal node + * is selected all child sequences get highlighted as well. + */ public void showNodeSelectionOnAlign(MouseEvent e); public void treeSelectionChanged(SequenceI sequence);