com.alee.extended.tree
Interface AsyncTreeDataUpdater<E extends AsyncUniqueNode>


public interface AsyncTreeDataUpdater<E extends AsyncUniqueNode>

This interface provides methods for asynchronous tree data update. Basically these methods called when some tree node is renamed, moved or removed. This interface will be informed about such changes so you can perform data update actions.

Author:
Mikle Garin

Method Summary
 void nodeMoved(E node, E oldParent, E newParent, java.lang.Runnable moveFailed)
          Called when node move (D&D or cut/paste) operation performed.
 void nodeRemoved(E node, java.lang.Runnable removeFailed)
          Called when node remove operation performed.
 void nodeRenamed(E node, java.lang.String oldName, java.lang.String newName, java.lang.Runnable renameFailed)
          Called when node rename operation performed.
 void nodesAdded(java.util.List<E> nodes, E parentNode, java.lang.Runnable addFailed)
          Called when node add operation performed.
 

Method Detail

nodesAdded

void nodesAdded(java.util.List<E> nodes,
                E parentNode,
                java.lang.Runnable addFailed)
Called when node add operation performed. At this point node is already added visually, but you can still cancel this action if you cannot update data properly.

Parameters:
nodes - added nodes list
parentNode - parent node where specified nodes were added
addFailed - runnable you should call in case data update failed, it will cancel changes

nodeRenamed

void nodeRenamed(E node,
                 java.lang.String oldName,
                 java.lang.String newName,
                 java.lang.Runnable renameFailed)
Called when node rename operation performed. At this point node is already renamed visually, but you can still cancel this action if you cannot update data properly.

Parameters:
node - renamed node
oldName - old node name
newName - new node name
renameFailed - runnable you should call in case data update failed, it will cancel changes

nodeMoved

void nodeMoved(E node,
               E oldParent,
               E newParent,
               java.lang.Runnable moveFailed)
Called when node move (D&D or cut/paste) operation performed. At this point node is already moved visually, but you can still cancel this action if you cannot update data properly.

Parameters:
node - moved node
oldParent - old parent node
newParent - new parent node
moveFailed - runnable you should call in case data update failed, it will cancel changes

nodeRemoved

void nodeRemoved(E node,
                 java.lang.Runnable removeFailed)
Called when node remove operation performed. At this point node is already removed visually, but you can still cancel this action if you cannot update data properly.

Parameters:
node - removed node
removeFailed - runnable you should call in case data update failed, it will cancel changes