LoadedTreeSequenceAssociation bindAptxNodes = new LoadedTreeSequenceAssociation(
parentAvport.getAlignment().getSequencesArray(),
treeView.getTree());
- bindAptxNodes.associateLeavesToSequences();
+ bindAptxNodes.associateNodesToSequences();
sequencesBoundToNodes = bindAptxNodes.getAlignmentWithNodes();
nodesBoundToSequences = bindAptxNodes.getNodesWithAlignment();
TreeViewerUtils.associateNodesWithJalviewSequences(aptxFrame,
rootX = tree.getRoot().getXcoord();
// don't bother if 0 distance tree or clicked x lies outside of tree
- if (furthestNodeX != rootX && !(x > furthestNodeX))
- {
+ // if (furthestNodeX != rootX && !(x > furthestNodeX))
+
float threshold = (x - rootX) / (furthestNodeX - rootX);
List<TreeNodeI> foundNodes = getNodesAboveThreshold(
threshold,
tree.getRoot());
- }
- else
- {
- // clear previous colours?
- }
+
}
}
- /**
- * may or may not need an extra repaint on the alignment view (check what kira
- * does)
- */
+
@Override
public void showNodeSelectionOnAlign(final TreeNodeI node)
{
for (TreeNodeI childNode : childNodes)
{
- // childNode.getBranchData().setBranchColor(new BranchColor(Color.BLUE));
-
SequenceI matchingSequence = nodesBoundToSequences.get(childNode);
if (matchingSequence != null)
{
}
- /**
- * Refactored from TreeCanvas.
- *
- * @param sequence
- * of the node selected in the tree viewer.
- */
+
@Override
public void treeSelectionChanged(final SequenceI sequence)
{
.getAssociatedPanels(parentAvport.getSequenceSetId());
}
+ @Override
+ public Map<SequenceI, TreeNodeI> getAlignmentWithNodes()
+ {
+ return sequencesBoundToNodes;
+ }
+
+ @Override
+ public Map<TreeNodeI, SequenceI> getNodesWithAlignment()
+ {
+ return nodesBoundToSequences;
+ }
}