JAL-2805 interface comments, progress on associating leaves
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Tue, 14 Nov 2017 15:28:56 +0000 (15:28 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Tue, 14 Nov 2017 15:28:56 +0000 (15:28 +0000)
src/jalview/ext/archaeopteryx/AptxBinding.java
src/jalview/ext/archaeopteryx/AptxNodeAssociation.java
src/jalview/ext/archaeopteryx/ExternalTreeViewerBindingI.java

index 00462aa..d82f660 100644 (file)
@@ -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);
-
       }
 
     }
index ec7ca27..32ca883 100644 (file)
@@ -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<SequenceI> 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"
index c9f5820..2a807a3 100644 (file)
@@ -42,6 +42,11 @@ interface ExternalTreeViewerBindingI<N>
         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);