public UpdaterTreeState(AbstractTreeUi ui, boolean isEmpty) {
    myUi = ui;

    if (!isEmpty) {
      final JTree tree = myUi.getTree();
      putAll(addPaths(tree.getSelectionPaths()), myToSelect);
      putAll(
          addPaths(tree.getExpandedDescendants(new TreePath(tree.getModel().getRoot()))),
          myToExpand);
    }
  }
Esempio n. 2
0
 private void saveExpansionState() {
   Object root = companionsTable.getTreeTableModel().getRoot();
   Enumeration<TreePath> paths = tree.getExpandedDescendants(new TreePath(root));
   expandedPaths = Collections.list(paths);
 }