if (node == null)
{
throw new IllegalArgumentException("ObjectTreeNode == null");
}
final TreePath nodePath = new TreePath(node.getPath());
if (matchKeyPrefix(previouslySelectedTreePathNames, node, nodePath.toString()))
{
selectedTreePaths.add(nodePath);
}
try
{
_startExpandInThread = false;
expandPath(nodePath);
}
finally
{
_startExpandInThread = true;
}
// Go through each child of the parent and see if it was previously
// expanded. If it was recursively call this method in order to expand
// the child.
@SuppressWarnings("unchecked")
Enumeration<ObjectTreeNode> childEnumeration =
(Enumeration<ObjectTreeNode>) node.children();
Iterator<ObjectTreeNode> it =
new EnumerationIterator<ObjectTreeNode>(childEnumeration);
while (it.hasNext())
{
final ObjectTreeNode child = it.next();
final TreePath childPath = new TreePath(child.getPath());
final String childPathName = childPath.toString();
if (matchKeyPrefix(previouslySelectedTreePathNames, child, childPathName))
{
selectedTreePaths.add(childPath);
}