Behavior like in the CollapsibleTreeDemo is great for special purpose applications or domain specific applications. It does not work so well in a general purpose diagram editor like yEd (e.g. because the automatic arrangement on collapse and expand in the demo requires the diagram to be a tree).
That said, yEd does offer collapsible/expandable group nodes (even though collapsing or expanding groups does not automatically re-arrange the diagram).