com.alee.extended.tree.sample
Class SampleDataProvider

java.lang.Object
  extended by com.alee.extended.tree.AbstractTreeDataProvider<SampleNode>
      extended by com.alee.extended.tree.sample.SampleDataProvider
All Implemented Interfaces:
AsyncTreeDataProvider<SampleNode>

public class SampleDataProvider
extends AbstractTreeDataProvider<SampleNode>

Sample asynchronous tree data provider.

Author:
Mikle Garin

Field Summary
 
Fields inherited from class com.alee.extended.tree.AbstractTreeDataProvider
comparator, filter
 
Constructor Summary
SampleDataProvider()
           
 
Method Summary
 SampleNode getRoot()
          Returns asynchronous tree sample root node.
 boolean isLeaf(SampleNode node)
          Returns whether the specified sample node is leaf or not.
 void loadChilds(SampleNode parent, ChildsListener<SampleNode> listener)
          Returns sample child nodes for specified asynchronous tree node.
 
Methods inherited from class com.alee.extended.tree.AbstractTreeDataProvider
getChildsComparator, getChildsFilter, setChildsComparator, setChildsFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleDataProvider

public SampleDataProvider()
Method Detail

getRoot

public SampleNode getRoot()
Returns asynchronous tree sample root node.

Returns:
root node

loadChilds

public void loadChilds(SampleNode parent,
                       ChildsListener<SampleNode> listener)
Returns sample child nodes for specified asynchronous tree node.

Parameters:
parent - childs parent node
listener - childs loading progress listener

isLeaf

public boolean isLeaf(SampleNode node)
Returns whether the specified sample node is leaf or not. Simply checks the node type to determine if it is leaf or not.

Specified by:
isLeaf in interface AsyncTreeDataProvider<SampleNode>
Overrides:
isLeaf in class AbstractTreeDataProvider<SampleNode>
Parameters:
node - node
Returns:
true if the specified node is leaf, false otherwise