public static interface DynamicTreeModule.TreeCallback
DynamicTreeModule.TreeCallback
s can be used by DynamicTreeModule
s to request refreshes of the
tree in response to changes to domain data. For each TreePath
the
DynamicTreeModule
is supplied with a separate DynamicTreeModule.TreeCallback
which targets the
path's scope.
Depending on the requirements, a refresh may only target a node's derived properties like
labels or icons but also contributed children etc. Furthermore, a change may require a refresh
of child nodes as well. For each situation the correct DynamicTreeModule.TreeCallback
must be used.
The following table gives an overview of this interface's methods and their effects:
Method | Properties Refresh | Child Contributions Refresh | Scope |
---|---|---|---|
nodeRefreshRequired() |
yes | no | only current node |
childrenRefreshRequired() |
children only | no | all immediate children of current node |
childrenRefreshRequired(Collection) |
children only | no | children of current node corresponding to the given domain objects |
subtreeRefreshRequired() |
children only | no | all descendants of the current node |
subtreeRefreshRequired(Collection) |
children only | no | descendants of current node corresponding to the given domain objects |
fullRefreshRequired() |
yes | yes | current node and all descendants |
Modifier and Type | Method and Description |
---|---|
void |
childrenRefreshRequired()
Receive notification that the domain object or data that the target node represents changed
in some way that makes it necessary to update the derived properties of all immediate
children of the target node that have been contributed by the current module.
|
void |
childrenRefreshRequired(Collection<? extends Object> domainObjects)
Receive notification that a collection of domain objects or data that the target node
represents changed in some way that makes it necessary to update the derived properties of
all immediate children of the target node that have been contributed by the current module.
|
void |
fullRefreshRequired()
Receive notification that the domain object or data that the target node represents changed
in some way that makes it necessary to update the derived properties of all nodes within the
sub-tree starting at the target node.
|
void |
nodeRefreshRequired()
Receive notification that the domain object or data that the target node represents changed
in some way that makes it necessary to update the node's derived properties.
|
void |
subtreeRefreshRequired()
Receive notification that the domain object or data that the target node represents changed
in some way that makes it necessary to update the derived properties of all nodes within the
sub-tree starting at the target node.
|
void |
subtreeRefreshRequired(Collection<? extends Object> domainObjects)
Receive notification that a collection of domain objects or data that the target node
represents changed in some way that makes it necessary to update the derived properties of
all nodes within the sub-tree starting at the target node.
|
void nodeRefreshRequired()
void childrenRefreshRequired()
void childrenRefreshRequired(Collection<? extends Object> domainObjects)
void subtreeRefreshRequired()
void subtreeRefreshRequired(Collection<? extends Object> domainObjects)
void fullRefreshRequired()
DynamicTreeModule.TreeCallback
, this call will cause a re-query of the child list from
TreeContentProvider.getChildren(TreePath)
enabling a TreeContentProvider
to
provide dynamic children without maintaining a dynamic child list. Additionally, all nodes
within the subtree will be refreshed irrespective of the module that has contributed them.
Please note that this call may incur significant processing cost. Its use must therefore be
restricted to those rare cases when it is absolutely required. In general, it is preferable
to use one of the other *RefreshRequired(...)
methods instead.Copyright © 2024 levigo holding gmbh. All rights reserved.