Package jaxx.runtime.swing.nav
Class NavNodeChildLoador<T,O,M,B extends NavBridge<M,N>,N extends NavNode<M,N>>
java.lang.Object
jaxx.runtime.swing.nav.NavNodeChildLoador<T,O,M,B,N>
- Type Parameters:
T- type of data used to create nodes (can be just a String type to use only ids)O- type of data associated with nodesN- type of node to used (to make possible full co-variance and no cast in fal implementations).
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
NavTreeNodeChildLoador,NavTreeTableNodeChildLoador
public abstract class NavNodeChildLoador<T,O,M,B extends NavBridge<M,N>,N extends NavNode<M,N>>
extends java.lang.Object
implements java.io.Serializable
Object to load childs of a node.
It uses
NavDataProvider in method
loadChilds(NavBridge, NavNode, NavDataProvider) to obtain datas
then build childs nodes.
A factory of such objects can be found in NavHelper to make
them reusable in other places than inside a NavNode to auto-load
childs.
For example when you want to creat by hand a new node, always prefer to reuse
a such object rathen than duplicate same code in helper...- Since:
- 2.1
- Author:
- Tony Chemit - chemit@codelutin.com
- See Also:
NavHelper,NavNode, Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedNavNodeChildLoador(java.lang.Class<O> beanType) -
Method Summary
Modifier and Type Method Description protected voidaddChildNodes(N parentNode, java.util.List<T> datas, NavDataProvider dataProvider)Add childs to givenparentNodeusing retrivedatasfrom the data provider.abstract NcreateNode(T data, NavDataProvider dataProvider)Hook to create a child node given hisdata.java.lang.Class<O>getBeanType()Returns the type of data associated with nodes to create.abstract java.util.List<T>getData(java.lang.Class<?> parentClass, java.lang.String parentId, NavDataProvider dataProvider)Obtain the list of data used to create nodes.voidloadChilds(B bridge, N parentNode, NavDataProvider dataProvider)Load childs of the givenparentnode.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
beanType
Type of data of the node
-
-
Constructor Details
-
NavNodeChildLoador
-
-
Method Details
-
getBeanType
Returns the type of data associated with nodes to create.- Returns:
- the type of data associated with created nodes.