TreePanel class provides the API for working with trees in GXT, and it works much the same way as other store-based components. Once its
TreeStore instance is populated with data and the
TreePanel instance is attached to the DOM, we are ready to view the hierarchy of nodes that can either be a parent or a leaf.
The hierarchy of nodes is rendered as highlightable (
setTrackMouseOver()) and clickable items, labelled either by passing a property
name in the model (from the
TreeStore instance) to the
setDisplayProperty() method of the tree, or by passing a
ModelStringProvider implementation to the
setLabelProvider() method of the tree.
Besides the other things to enhance the comprehension of the code, we basically ...