Module org.apache.wicket.extensions
Class TreeModelProvider<T>
java.lang.Object
org.apache.wicket.extensions.markup.html.repeater.util.TreeModelProvider<T>
- Type Parameters:
T- model object type
- All Implemented Interfaces:
Serializable,ITreeProvider<T>,IDetachable,org.apache.wicket.util.io.IClusterable
A provider wrapping a Swing
EXPERIMENTAL !
TreeModel.
EXPERIMENTAL !
- Author:
- svenmeier
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionTreeModelProvider(TreeModel treeModel) Wrap the givenTreeModel.TreeModelProvider(TreeModel treeModel, boolean rootVisible) Wrap the givenTreeModel. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbranchUpdate(Object branch) protected Tvoiddetach()getChildren(T object) Get the children of the given node.getRoots()Get the roots of the tree.booleanhasChildren(T object) Does the given object have children - note that this method may returntrueeven ifITreeProvider.getChildren(Object)returns an empty iterator.Callback used by the consumer of this tree provider to wrap objects retrieved fromITreeProvider.getRoots()orITreeProvider.getChildren(Object)with a model (usually a detachable one).protected voidnodeUpdate(Object[] nodes) voidupdate(AbstractTree<T> tree, AjaxRequestTarget target) Call this method after all change to the wrappedTreeModelbeing initiated viaAjaxRequestTarget.
-
Field Details
-
completeUpdate
-
nodeUpdates
-
branchUpdates
-
-
Constructor Details
-
Method Details
-
getRoots
Description copied from interface:ITreeProviderGet the roots of the tree.- Specified by:
getRootsin interfaceITreeProvider<T>- Returns:
- roots
-
hasChildren
Description copied from interface:ITreeProviderDoes the given object have children - note that this method may returntrueeven ifITreeProvider.getChildren(Object)returns an empty iterator.- Specified by:
hasChildrenin interfaceITreeProvider<T>- Parameters:
object- the node to check for children- Returns:
trueif node has children
-
getChildren
Description copied from interface:ITreeProviderGet the children of the given node.- Specified by:
getChildrenin interfaceITreeProvider<T>- Parameters:
object- node to get children for- Returns:
- children of node
-
cast
-
model
Description copied from interface:ITreeProviderCallback used by the consumer of this tree provider to wrap objects retrieved fromITreeProvider.getRoots()orITreeProvider.getChildren(Object)with a model (usually a detachable one).Important note: The model must implement
Object.equals(Object)andObject.hashCode()!- Specified by:
modelin interfaceITreeProvider<T>- Parameters:
object- the object that needs to be wrapped- Returns:
- the model representation of the object
-
detach
- Specified by:
detachin interfaceIDetachable
-
update
Call this method after all change to the wrappedTreeModelbeing initiated viaAjaxRequestTarget.- Parameters:
tree- the tree utilizing thisITreeProvidertarget- theAjaxRequestTargetwhich initiated the changes
-
nodeUpdate
-
branchUpdate
-