public interface TreeContentProvider extends TreeModule
FlexibleTree
.
Retrieving content is a two-step process:
TreeContentProvider
s are asked whether or not they
want to provide any contents. This is done via hasChildren(TreePath)
. The result of this
call is used to determine
TreeContentProvider
should be taken into account for a given tree node.getChildren(TreePath)
. This method is only called if
the requested content is actually needed. The reason is that contents assembly potentially takes
longer than just deciding whether or not any content shall be contributed.DynamicTreeModule
. Using its facilities, implementors are indirectly able to trigger new
requests to hasChildren(TreePath)
.DynamicTreeModule
Modifier and Type | Method and Description |
---|---|
EventList<? extends Object> |
getChildren(TreePath treePath)
Returns a
EventList containing all the contents (children) for the last tree path
component of given tree path. |
boolean |
hasChildren(TreePath treePath)
Determines whether the last tree path component can have children.
|
EventList<? extends Object> getChildren(TreePath treePath)
EventList
containing all the contents (children) for the last tree path
component of given tree path. If no children should be contributed (neither now, nor in the
future) this method should return null
.treePath
- to supply children forEventList
of children or null
.boolean hasChildren(TreePath treePath)
true
is returned from a call to this method, it is still
allowed to return null
or an empty list from calls to
getChildren(TreePath)
.treePath
- to analysetrue
if the last tree path component can have children, otherwise
false
.Copyright © 2024 levigo holding gmbh. All rights reserved.