public class TreeControllerWrapper<T> extends java.lang.Object implements TreeController<T>
| Modifier and Type | Field and Description |
|---|---|
protected TreeController<T> |
controller |
| Constructor and Description |
|---|
TreeControllerWrapper(TreeController<T> controllerToWrap) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Tree tree,
java.lang.Object object,
T target)
Adds given object as a child of 'target' node (by default as last child), if null then new object is created
|
void |
add(Tree tree,
java.lang.Object object,
T target,
int index)
Adds given object as a child of 'target' node, if null then new object is created
|
T |
create(Tree tree,
T target)
Creates new object as a child of 'target' node
|
T |
create(Tree tree,
T target,
int index)
Creates new object as a child of 'target' node
|
java.lang.Object |
customAction(Tree tree,
org.zkoss.zk.ui.event.Event event,
T node)
If some custom actions were added to the tree, this method will be called for each of them
|
void |
delete(Tree tree,
T node)
Deletes given node
|
void |
doubleClicked(Tree tree,
T node)
Called when given node was double clicked in tree
|
java.util.Set<T> |
getSelected() |
void |
move(Tree tree,
T node,
T target,
boolean addAsChild)
Moves given node in place of 'target' node.
|
void |
selected(Tree tree,
java.util.Set<Treeitem> selectedItems)
Called every time the tree node was selected
|
protected final TreeController<T> controller
public TreeControllerWrapper(TreeController<T> controllerToWrap)
public void add(Tree tree, java.lang.Object object, T target)
TreeControlleradd in interface TreeController<T>tree - after successful addition, tree will be notified to update itselfobject - e.g. the dragged component which contains something to add to the 'target' node, null indicates that new
object shall be created or anything elsetarget - that will have 'object' added.public void add(Tree tree, java.lang.Object object, T target, int index)
TreeControlleradd in interface TreeController<T>tree - after successful addition, tree will be notified to update itselfobject - e.g. the dragged component which contains something to add to the 'target' node, or anything elsetarget - that will have 'object' added.index - at which the 'object' will be added within 'target' child setpublic T create(Tree tree, T target)
TreeControllercreate in interface TreeController<T>tree - after successful creation, tree will be notified to update itselftarget - that will have new 'object' added.public T create(Tree tree, T target, int index)
TreeControllercreate in interface TreeController<T>tree - after successful creation, tree will be notified to update itselftarget - that will have new 'object' added.index - at which the new 'object' will be added within 'target' child setpublic java.lang.Object customAction(Tree tree, org.zkoss.zk.ui.event.Event event, T node)
TreeControllercustomAction in interface TreeController<T>tree - to play with if necessaryevent - original event that was sent when custom action button was clickednode - from selected tree itempublic void delete(Tree tree, T node)
TreeControllerdelete in interface TreeController<T>tree - after successful deletion, tree will be notified to update itselfnode - to deletepublic void doubleClicked(Tree tree, T node)
TreeControllerdoubleClicked in interface TreeController<T>tree - to play with after whatever was donenode - which was double clickedpublic java.util.Set<T> getSelected()
getSelected in interface SelectableComponent<Tree,Treeitem,T>public void move(Tree tree, T node, T target, boolean addAsChild)
TreeControllermove in interface TreeController<T>tree - after successful movement, tree will be notified to update itselfnode - to be movedtarget - node to be shifted. In place of this 'target' node the 'node' will be moved.addAsChild - flag indicating whether node should be added as a child or not.public void selected(Tree tree, java.util.Set<Treeitem> selectedItems)
SelectableComponentselected in interface SelectableComponent<Tree,Treeitem,T>tree - in case an update is neededselectedItems - set of currently selected itemsCopyright © 2018 SAP SE. All Rights Reserved.