ProgramNode getSelectedNode() {
		if (tree.getSelectionCount() == 0) {
			return null;
		}
		return (ProgramNode) tree.getSelectionPath().getLastPathComponent();
	}
Set whether this tree has focus.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramTreePanel.java