import jalview.util.MessageManager;
import jalview.viewmodel.AlignmentViewport;
+import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.InputEvent;
import javax.swing.event.ChangeListener;
import org.forester.archaeopteryx.MainFrame;
+import org.forester.archaeopteryx.TreePanelUtil;
import org.forester.phylogeny.Phylogeny;
import org.forester.phylogeny.PhylogenyMethods;
import org.forester.phylogeny.PhylogenyNode;
+import org.forester.phylogeny.data.BranchColor;
/**
* Class for binding the Archaeopteryx tree viewer to the Jalview alignment that
//
// System.out.println(relativeTreeWidth);
- float xRoot = tree.getRoot().getXcoord();
- double threshold = ((double) x - xRoot) / longestBranch;
- System.out.println(threshold);
+ float rootX = tree.getRoot().getXcoord();
+ double threshold = ((double) x - rootX) / longestBranch;
List<PhylogenyNode> foundNodes = getNodesAboveThreshold(threshold,
longestBranch, tree.getRoot());
for (PhylogenyNode foundNode : foundNodes)
{
- System.out.println(foundNode);
+ Color randomColor = new Color((int) (Math.random() * 255),
+ (int) (Math.random() * 255), (int) (Math.random() * 255));
+ TreePanelUtil.colorizeSubtree(foundNode,
+ new BranchColor(randomColor));
}
+
// groupNodes(threshold, tree.getRoot(), longestBranch);
if (nodeCutoff > threshold)
{
- nodeList.add(node);
+ nodeList.add(childNode);
}
else