Beispiel #1
0
 public void testInfiniteExpand() {
   InfiniteTreeModel model = new InfiniteTreeModel();
   myTree = new JTree(model);
   TreePath rootPath = new TreePath(model.getRoot());
   myTree.setSelectionPath(rootPath);
   myTree.collapsePath(rootPath);
   TreeExpandCollapse.expandAll(myTree);
   checkExpanded(rootPath);
   TreeExpandCollapse.expandAll(myTree);
 }
Beispiel #2
0
 public void testSubsequentExpand() {
   InfiniteTreeModel model = new InfiniteTreeModel();
   myTree = new JTree(model);
   TreeExpandCollapse.expandAll(myTree);
   TreePath path = new TreePath(model.getRoot());
   while (myTree.isExpanded(path))
     path = path.pathByAddingChild(model.getChild(path.getLastPathComponent(), 0));
   checkCollapsed(path);
   TreeExpandCollapse.expandAll(myTree);
   checkExpanded(path);
 }