TreeViewNode root = uiDelegate.getRoot(); if (root.equals(node)) return;
    void collapseNode(TreeViewNode node)    {        if (node == null) return;        uiDelegate.getTree().collapsePath(new TreePath(node.getPath()));    }