Trees generate three new types of events that are worth mentioning. Apart from the obvious selection and expansion events from the graphical side, you can also catch structural changes with model events.
class encapsulates model changes in the
form of the path that has changed, as well as information on the
children of that path.
Hold the children and their indices in the parent node associated with this event.
Holds the path to the parent of the children associated with this event.
These constructors allow you to build an event that encompasses the children of a modified node. This type of event is useful if the references to the node’s children have changed, or if the number of children has changed.
If the modified node is the only interesting node for this event (if its value changed, but nothing happened to its children, for example) then you can use these constructors.
If the event contains information about the affected children of a node, you can retrieve those indices and the ...