com.alee.extended.tree
Class AsyncPathExpansionAdapter<E extends AsyncUniqueNode>

java.lang.Object
  extended by com.alee.extended.tree.AsyncPathExpansionAdapter<E>
Type Parameters:
E - node type
All Implemented Interfaces:
AsyncPathExpansionListener<E>

public abstract class AsyncPathExpansionAdapter<E extends AsyncUniqueNode>
extends java.lang.Object
implements AsyncPathExpansionListener<E>

This custom adapter is used to track async tree path expansion action.

Author:
Mikle Garin

Constructor Summary
AsyncPathExpansionAdapter()
           
 
Method Summary
 void pathExpanded(E lastNode)
          Notifies that path expansion has finished succesfully.
 void pathFailedToExpand()
          Notifies that path expansion has failed and did not find even a single node.
 void pathNodeExpanded(E expandedNode)
          Notifies that one of path nodes was just expanded.
 void pathPartiallyExpanded(E lastFoundNode)
          Notifies that path expansion was not fully finished and cannot be continued.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncPathExpansionAdapter

public AsyncPathExpansionAdapter()
Method Detail

pathFailedToExpand

public void pathFailedToExpand()
Notifies that path expansion has failed and did not find even a single node. This might happen in case there is no loaded nodes with an ID from the path in the moment when expansion is invoked.

Specified by:
pathFailedToExpand in interface AsyncPathExpansionListener<E extends AsyncUniqueNode>

pathNodeExpanded

public void pathNodeExpanded(E expandedNode)
Notifies that one of path nodes was just expanded. This might be called a few times per single path expansion depending on the length of the path and some other factors.

Specified by:
pathNodeExpanded in interface AsyncPathExpansionListener<E extends AsyncUniqueNode>
Parameters:
expandedNode - recently expanded node from the specified path

pathPartiallyExpanded

public void pathPartiallyExpanded(E lastFoundNode)
Notifies that path expansion was not fully finished and cannot be continued. Last node that could be expanded from the specified path is returned. There might be a lot of reasons why this happened - failed node childs loading, unexisting node ID etc.

Specified by:
pathPartiallyExpanded in interface AsyncPathExpansionListener<E extends AsyncUniqueNode>
Parameters:
lastFoundNode - last reached path node

pathExpanded

public void pathExpanded(E lastNode)
Notifies that path expansion has finished succesfully. That means that the last path node was actually reached in the tree.

Specified by:
pathExpanded in interface AsyncPathExpansionListener<E extends AsyncUniqueNode>
Parameters:
lastNode - last path node