1 package jalview.ext.treeviewer;
3 import jalview.datamodel.SequenceI;
9 * Interface for implementing a tree node, these nodes might -but do not have
10 * to- be part of a {@link TreeI}.
12 * @author kjvanderheide
15 public interface TreeNodeI
18 public void addAsChild(TreeNodeI childNode);
20 public List<TreeNodeI> getAllDescendants();
23 * Returns only the immediate descendants of this node, so any nodes whose
24 * parent is this node.
28 public List<TreeNodeI> getDirectChildren();
31 * Gets just the nodes downwards from this node that are external/leafs.
35 public List<TreeNodeI> getExternalDescendants();
39 public String getNodeName();
41 public SequenceI getSequence();
43 public float getXcoord();
45 public float getYcoord();
49 * @return True if the node is internal, false if it's external (a leaf).
51 public boolean isInternal();
53 public boolean isCollapsed();
55 public void setBranchColor(Color branchColor);
57 public void setSequence(SequenceI seq);