/** * Returns the TreeState of this tree. * * @return Tree state instance */ public ITreeState getTreeState() { if (state == null) { state = newTreeState(); // add this object as listener of the state state.addTreeStateListener(this); } return state; }
@Override public void bind(Component component) { super.bind(component); if (component instanceof AbstractTree) { AbstractTree tree = (AbstractTree) component; tree.getTreeState().addTreeStateListener(new TreeStateListener()); } }
treeState.addTreeStateListener(new ITreeStateListener() { @Override public void allNodesCollapsed() {