assertFalse(tree.isExpanded(unexistedPath));
tree.setExpandedState(path111, false);
assertTrue(tree.isExpanded(path1));
assertTrue(tree.isExpanded(path11));
assertFalse(tree.isExpanded(path111));
tree.addTreeWillExpandListener(new TreeWillExpandListener() {
public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
throw new ExpandVetoException(event);
}
public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {
}
});
tree.setExpandedState(path111, true);
assertTrue(tree.isExpanded(path1));
assertTrue(tree.isExpanded(path11));
assertFalse(tree.isExpanded(path111));
tree.addTreeWillExpandListener(new TreeWillExpandListener() {
public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
}
public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {
throw new ExpandVetoException(event);