public GTreeNode getRoot() {
		if (isRoot()) {
			return this;
		}
		GTreeNode myParent = getParent();
		if (myParent != null) {
			return myParent.getRoot();
		}
		return null;
	}
Returns the rootNode for this tree or null if there is no parent path to a root node.

@return the rootNode for a tree of nodes in a {@link GTree}
Ghidra/Framework/Docking/src/main/java/docking/widgets/tree/GTreeNode.java