public interface ForestChangeEventHandler
ForestChangeEventHandler
is passed to one of the mutator methods of the Forest
instance like Forest#moveSubtree(long, long, long, ForestChangeEventHandler)
and corresponding methods
are called before or after the change is made to the forest.Modifier and Type | Method and Description |
---|---|
void |
afterForestInserted(Forest forest,
int fromIndex,
int toIndex,
Forest insertedForest)
Called at the moment after another forest is added to the forest being observed.
|
void |
beforeSubtreeRemoved(Forest forest,
int fromIndex,
int toIndex,
Forest removedSubtree)
Called at the moment before a subtree is removed from the forest.
|
void beforeSubtreeRemoved(Forest forest, int fromIndex, int toIndex, Forest removedSubtree)
Called at the moment before a subtree is removed from the forest.
The code must not modify the forests, otherwise the result is undefined.
forest
- the forest being changedfromIndex
- the index of the root element of the subtreetoIndex
- the index of an element that follows the removed subtree (or the size of the forest if the subtree is
at the end of the forest). Invariant: toIndex == forest.getSubtreeEnd(fromIndex)
removedSubtree
- the copy of the subtree being removedvoid afterForestInserted(Forest forest, int fromIndex, int toIndex, Forest insertedForest)
Called at the moment after another forest is added to the forest being observed. The added forest
completely resides under a certain parent issue, or at the top level. In other words, it is impossible
that any issue within range [fromIndex, toIndex)
has depth less than the first issue of the added forest [fromIndex]
.
The code must not modify the forests, otherwise the result is undefined.
forest
- the forest being changedfromIndex
- the index of the first element being insertedtoIndex
- the index of an element that follows the added part of the forest (or the size of the forest if the issues
are added at the end).insertedForest
- the forest that has been insertedCopyright © 2024 Tempo Software. All Rights Reserved.