N
- node typepublic abstract class AbstractExTreeDataProvider<N extends UniqueNode> extends Object implements ExTreeDataProvider<N>
ExTreeDataProvider
that can contain single comparator and filter for child nodes.Modifier and Type | Field and Description |
---|---|
protected Comparator<N> |
comparator
Comparator for all child nodes. |
protected Filter<N> |
filter
Filter for all child nodes. |
Constructor and Description |
---|
AbstractExTreeDataProvider() |
Modifier and Type | Method and Description |
---|---|
WebTreeModel<N> |
createPlainModel()
Returns plain
WebTreeModel with data from this AbstractExTreeDataProvider implementation. |
Comparator<N> |
getChildrenComparator(N parent,
List<N> children)
Returns
Comparator that will be used for the specified UniqueNode children. |
Filter<N> |
getChildrenFilter(N parent,
List<N> children)
Returns
Filter that will be used for the specified UniqueNode children. |
protected void |
loadPlainChildren(N parent)
Loads all child
UniqueNode s for the specified parent UniqueNode recursively. |
void |
setChildrenComparator(Comparator<N> comparator)
Sets children comparator for all nodes.
|
void |
setChildrenFilter(Filter<N> filter)
Sets children filter for all nodes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildren, getRoot
@Nullable protected transient Filter<N extends UniqueNode> filter
Filter
for all child nodes.
It is transient
as it can only be set through code.
Override getChildrenFilter(UniqueNode, List)
method to provide parent-related Filter
.@Nullable protected transient Comparator<N extends UniqueNode> comparator
Comparator
for all child nodes.
It is transient
as it can only be set through code.
Override getChildrenComparator(UniqueNode, List)
method to provide parent-related Comparator
.@Nullable public Filter<N> getChildrenFilter(@NotNull N parent, @NotNull List<N> children)
ExTreeDataProvider
Filter
that will be used for the specified UniqueNode
children.
Specific List
of child UniqueNode
s is given for every separate filter operation.
No filtering applied to children in case null
is returned.
This operation is always performed on EDT and should not take excessive amounts of time.getChildrenFilter
in interface ExTreeDataProvider<N extends UniqueNode>
parent
- UniqueNode
which children will be filtered using returned Filter
children
- UniqueNode
s to be filteredFilter
that will be used for the specified UniqueNode
childrenpublic void setChildrenFilter(@Nullable Filter<N> filter)
filter
- children filter for all nodes@Nullable public Comparator<N> getChildrenComparator(@NotNull N parent, @NotNull List<N> children)
ExTreeDataProvider
Comparator
that will be used for the specified UniqueNode
children.
Specific List
of child UniqueNode
s is given for every separate comparison operation.
No sorting applied to children in case null
is returned.
This operation is always performed on EDT and should not take excessive amounts of time.getChildrenComparator
in interface ExTreeDataProvider<N extends UniqueNode>
parent
- UniqueNode
which children will be sorted using returned Comparator
children
- UniqueNode
s to be sortedComparator
that will be used for the specified UniqueNode
childrenpublic void setChildrenComparator(@Nullable Comparator<N> comparator)
comparator
- children comparator for all nodes@NotNull public WebTreeModel<N> createPlainModel()
WebTreeModel
with data from this AbstractExTreeDataProvider
implementation.WebTreeModel
with data from this AbstractExTreeDataProvider
implementationprotected void loadPlainChildren(@NotNull N parent)
UniqueNode
s for the specified parent UniqueNode
recursively.parent
- parent UniqueNode
to load all children for recursivelyCopyright © 2020. All rights reserved.