Merge branch 'kjvdh/features/PhylogenyViewer' of
[jalview.git] / src / jalview / ext / archaeopteryx / JalviewBinding.java
index 19a66f8..ee349b6 100644 (file)
@@ -178,12 +178,12 @@ public final class JalviewBinding
   @Override
   public void showMatchingChildSequences(final PhylogenyNode parentNode)
   {
-    final List<PhylogenyNode> childNodes = PhylogenyMethods
+    List<PhylogenyNode> childNodes = PhylogenyMethods
             .getAllDescendants(parentNode);
-    // final BranchColor branchColor = new BranchColor();
 
     for (PhylogenyNode childNode : childNodes)
     {
+
       SequenceI matchingSequence = nodesBoundToSequences.get(childNode);
       if (matchingSequence != null)
       {
@@ -227,7 +227,79 @@ public final class JalviewBinding
   {
     this.parentAvport = parentAvport;
   }
-
+  // av.setCurrentTree(tree);
+  //
+  // /*
+  // * isPopupTrigger is set for mousePressed (Mac)
+  // * or mouseReleased (Windows)
+  // */
+  // if (e.isPopupTrigger())
+  // {
+  // if (highlightNode != null)
+  // {
+  // chooseSubtreeColour();
+  // }
+  // return;
+  // }
+  //
+  // /*
+  // * defer right-click handling on Windows to
+  // * mouseClicked; note isRightMouseButton
+  // * also matches Cmd-click on Mac which should do
+  // * nothing here
+  // */
+  // if (SwingUtilities.isRightMouseButton(e))
+  // {
+  // return;
+  // }
+  //
+  // int x = e.getX();
+  // int y = e.getY();
+  //
+  // Object ob = findElement(x, y);
+  //
+  // if (ob instanceof SequenceI)
+  // {
+  // treeSelectionChanged((Sequence) ob);
+  // PaintRefresher.Refresh(tp, ap.av.getSequenceSetId());
+  // repaint();
+  // av.sendSelection();
+  // return;
+  // }
+  // else if (!(ob instanceof SequenceNode))
+  // {
+  // // Find threshold
+  // if (tree.getMaxHeight() != 0)
+  // {
+  // threshold = (float) (x - offx)
+  // / (float) (getWidth() - labelLength - (2 * offx));
+  //
+  // List<SequenceNode> groups = tree.groupNodes(threshold);
+  // setColor(tree.getTopNode(), Color.black);
+  //
+  // AlignmentPanel[] aps = getAssociatedPanels();
+  //
+  // // TODO push calls below into a single AlignViewportI method?
+  // // see also AlignViewController.deleteGroups
+  // for (int a = 0; a < aps.length; a++)
+  // {
+  // aps[a].av.setSelectionGroup(null);
+  // aps[a].av.getAlignment().deleteAllGroups();
+  // aps[a].av.clearSequenceColours();
+  // if (aps[a].av.getCodingComplement() != null)
+  // {
+  // aps[a].av.getCodingComplement().setSelectionGroup(null);
+  // aps[a].av.getCodingComplement().getAlignment()
+  // .deleteAllGroups();
+  // aps[a].av.getCodingComplement().clearSequenceColours();
+  // }
+  // }
+  // colourGroups(groups);
+  // }
+  //
+  // PaintRefresher.Refresh(tp, ap.av.getSequenceSetId());
+  // repaint();
+  // }
 }