code: public ManagementModelNode getSelectedNode() {
          if (tree.getSelectionPath() == null) return null;
          return (ManagementModelNode)tree.getSelectionPath().getLastPathComponent();
      }
docs: Get the node that has been selected by the user, or null if
  nothing is selected.
  @return The node or <code>null</code>