Lines Matching refs:aNode

468      * Returns the nearest common ancestor to this node and <code>aNode</code>.
470 * <code>aNode</code> are in different trees or if <code>aNode</code> is
475 * @param aNode node to find common ancestor with
476 * @return nearest ancestor common to this node and <code>aNode</code>,
479 public TreeNode getSharedAncestor(DefaultMutableTreeNode aNode) {
480 if (aNode == this) {
482 } else if (aNode == null) {
490 level2 = aNode.getLevel();
494 node1 = aNode;
499 node2 = aNode;
531 * Returns true if and only if <code>aNode</code> is in the same tree
532 * as this node. Returns false if <code>aNode</code> is null.
536 * @return true if <code>aNode</code> is in the same tree as this node;
537 * false if <code>aNode</code> is null
539 public boolean isNodeRelated(DefaultMutableTreeNode aNode) {
540 return (aNode != null) && (getRoot() == aNode.getRoot());
609 * @param aNode the TreeNode to get the path for
615 protected TreeNode[] getPathToRoot(TreeNode aNode, int depth) {
620 if(aNode == null) {
628 retNodes = getPathToRoot(aNode.getParent(), depth);
629 retNodes[retNodes.length - depth] = aNode;
697 DefaultMutableTreeNode aNode = (DefaultMutableTreeNode)getParent();
700 if (aNode == null) {
704 nextSibling = aNode.getNextSibling();
709 aNode = (DefaultMutableTreeNode)aNode.getParent();
845 * Returns true if <code>aNode</code> is a child of this node. If
846 * <code>aNode</code> is null, this method returns false.
848 * @return true if <code>aNode</code> is a child of this node; false if
849 * <code>aNode</code> is null
851 public boolean isNodeChild(TreeNode aNode) {
854 if (aNode == null) {
860 retval = (aNode.getParent() == this);