com.levigo.util.swing.flextree
Interface DynamicTreeModule

All Superinterfaces:
TreeModule
All Known Implementing Classes:
ReadStateModule

public interface DynamicTreeModule
extends TreeModule

The DynamicTreeModule is like any other TreeModule, except that it is supplied with a per-node callback enabling it to inform the representation about asynchronous changes. CAVEAT: this interface is currently in a state of flux. Please do not implement it independently.


Nested Class Summary
static interface DynamicTreeModule.TreeCallback
          DynamicTreeModule.TreeCallbacks can be used by DynamicTreeModules to request refreshes of the tree in response to changes to domain data.
 
Method Summary
 Disposable registerTreeCallback(TreePath treePath, DynamicTreeModule.TreeCallback callback)
          This method is called in order to supply the tree module with a DynamicTreeModule.TreeCallback for the given treePath.
 

Method Detail

registerTreeCallback

Disposable registerTreeCallback(TreePath treePath,
                                DynamicTreeModule.TreeCallback callback)
This method is called in order to supply the tree module with a DynamicTreeModule.TreeCallback for the given treePath. Using this callback the module can notify the FlexTree, that the object or data, that the node for the given path represents, changed in some way, that makes it necessary to update the node's derived properties. This method may return an instance of Disposable, called upon the disposal of the representation node. This mechanism is used to properly shut down any listeners set up to bridge changes from some domain object to the DynamicTreeModule.TreeCallback. Supplying a Disposable isn't mandatory, however. If some other mechanism for de-registration is applied (e.g. soft-references), implementors may return null.

Parameters:
treePath - path to the domain object which this callback is supplied for
Returns:
an object that is to be notified upon the disposal of the representation node or null, if the disposal is implemented by other means (e.g. a soft reference).


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.