void (int selectionIndex) { if (selectionIndex < 0) { myTree.clearSelection(); } else { final DirectoryChooser.ItemWrapper itemWrapper = myItems.get(selectionIndex); final DefaultMutableTreeNode node = myItemNodes.get(itemWrapper); final TreePath treePath = expandNode(node); myTree.setSelectionPath(treePath); myTree.scrollPathToVisible(treePath); } }