public static TreeElement getRoot ( TreeElement node ) { TreeElement parentNode = node . getParent ( ) ; while ( parentNode != null ) { node = parentNode ; parentNode = node . getParent ( ) ; } return node ; }
Gets the root node of this tree .