com.alee.extended.tree
Interface ExTreeDataProvider<E extends UniqueNode>

Type Parameters:
E - custom node type
All Known Implementing Classes:
AbstractExTreeDataProvider, SampleExDataProvider

public interface ExTreeDataProvider<E extends UniqueNode>

This interface provides methods for ex tree data retrieval.

Author:
Mikle Garin
See Also:
WebExTree, ExTreeModel

Method Summary
 java.util.List<E> getChilds(E node)
          Returns child nodes for the specified asynchronous tree node.
 java.util.Comparator<E> getChildsComparator(E node)
          Returns child nodes comparator for the specified asynchronous tree node.
 Filter<E> getChildsFilter(E node)
          Returns child nodes filter for the specified asynchronous tree node.
 E getRoot()
          Returns asynchronous tree root node.
 boolean isLeaf(E node)
          Returns whether the specified node is leaf (doesn't have any childs) or not.
 

Method Detail

getRoot

E getRoot()
Returns asynchronous tree root node. This request uses the EDT and should be processed quickly.

Returns:
root node

getChilds

java.util.List<E> getChilds(E node)
Returns child nodes for the specified asynchronous tree node.

Parameters:
node - parent node
Returns:
child nodes list

getChildsComparator

java.util.Comparator<E> getChildsComparator(E node)
Returns child nodes comparator for the specified asynchronous tree node. No sorting applied to childs in case null is returned.

Parameters:
node - parent node
Returns:
child nodes comparator

getChildsFilter

Filter<E> getChildsFilter(E node)
Returns child nodes filter for the specified asynchronous tree node. No filtering applied to childs in case null is returned.

Parameters:
node - parent node
Returns:
child nodes filter

isLeaf

boolean isLeaf(E node)
Returns whether the specified node is leaf (doesn't have any childs) or not. If you are not sure if the node is leaf or not - simply return false, that will allow the tree to expand this node on request.

Parameters:
node - node
Returns:
true if the specified node is leaf, false otherwise