It is possible to expand and collapse nodes via the 'expand', 'expandAll' and 'collapse', 'collapseAll' methods.