public class TreeControllerMock extends Object implements TreeController<Object>
DummyZKTest| Constructor and Description |
|---|
TreeControllerMock() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Tree tree,
Object object,
Object 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,
Object object,
Object target,
int index)
Adds given object as a child of 'target' node, if null then new object is created
|
Object |
create(Tree tree,
Object target)
Creates new object as a child of 'target' node
|
Object |
create(Tree tree,
Object target,
int index)
Creates new object as a child of 'target' node
|
Object |
customAction(Tree tree,
Event event,
Object node)
If some custom actions were added to the tree, this method will be called for each of them
|
void |
delete(Tree tree,
Object node)
Deletes given node
|
void |
doubleClicked(Tree tree,
Object node)
Called when given node was double clicked in tree
|
Set<Object> |
getSelected() |
void |
move(Tree tree,
Object node,
Object target,
boolean addAsChild)
Moves given node in place of 'target' node.
|
void |
selected(Tree tree,
Set selectedItems)
Called every time the tree node was selected
|
public Set<Object> getSelected()
getSelected in interface SelectableComponent<Tree,Treeitem,Object>public void selected(Tree tree, Set selectedItems)
SelectableComponentselected in interface SelectableComponent<Tree,Treeitem,Object>tree - in case an update is neededselectedItems - set of currently selected itemspublic void move(Tree tree, Object node, Object target, boolean addAsChild)
TreeControllermove in interface TreeController<Object>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 add(Tree tree, Object object, Object target, int index)
TreeControlleradd in interface TreeController<Object>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 void add(Tree tree, Object object, Object target)
TreeControlleradd in interface TreeController<Object>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 Object create(Tree tree, Object target)
TreeControllercreate in interface TreeController<Object>tree - after successful creation, tree will be notified to update itselftarget - that will have new 'object' added.public Object create(Tree tree, Object target, int index)
TreeControllercreate in interface TreeController<Object>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 void delete(Tree tree, Object node)
TreeControllerdelete in interface TreeController<Object>tree - after successful deletion, tree will be notified to update itselfnode - to deletepublic void doubleClicked(Tree tree, Object node)
TreeControllerdoubleClicked in interface TreeController<Object>tree - to play with after whatever was donenode - which was double clickedpublic Object customAction(Tree tree, Event event, Object node)
TreeControllercustomAction in interface TreeController<Object>tree - to play with if necessaryevent - original event that was sent when custom action button was clickednode - from selected tree itemCopyright © 2017 SAP SE. All Rights Reserved.