Class TreeControllerMock
java.lang.Object
de.hybris.platform.cockpit.zk.mock.test.TreeControllerMock
- All Implemented Interfaces:
SelectableComponent<Tree,,org.zkoss.zul.Treeitem, Object> TreeController<Object>
Just an empty mock, see
DummyZKTest-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds given object as a child of 'target' node (by default as last child), if null then new object is createdvoidAdds given object as a child of 'target' node, if null then new object is createdCreates new object as a child of 'target' nodeCreates new object as a child of 'target' nodecustomAction(Tree tree, org.zkoss.zk.ui.event.Event event, Object node) If some custom actions were added to the tree, this method will be called for each of themvoidDeletes given nodevoiddoubleClicked(Tree tree, Object node) Called when given node was double clicked in treevoidMoves given node in place of 'target' node.voidCalled every time the tree node was selected
-
Constructor Details
-
TreeControllerMock
public TreeControllerMock()
-
-
Method Details
-
getSelected
- Specified by:
getSelectedin interfaceSelectableComponent<Tree,org.zkoss.zul.Treeitem, Object> - Returns:
- currently selected set of items
-
selected
Description copied from interface:SelectableComponentCalled every time the tree node was selected- Specified by:
selectedin interfaceSelectableComponent<Tree,org.zkoss.zul.Treeitem, Object> - Parameters:
tree- in case an update is neededselectedItems- set of currently selected items
-
move
Description copied from interface:TreeControllerMoves given node in place of 'target' node.- Specified by:
movein interfaceTreeController<Object>- Parameters:
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.
-
add
Description copied from interface:TreeControllerAdds given object as a child of 'target' node, if null then new object is created- Specified by:
addin interfaceTreeController<Object>- Parameters:
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 set
-
add
Description copied from interface:TreeControllerAdds given object as a child of 'target' node (by default as last child), if null then new object is created- Specified by:
addin interfaceTreeController<Object>- Parameters:
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.
-
create
Description copied from interface:TreeControllerCreates new object as a child of 'target' node- Specified by:
createin interfaceTreeController<Object>- Parameters:
tree- after successful creation, tree will be notified to update itselftarget- that will have new 'object' added.- Returns:
- created object
-
create
Description copied from interface:TreeControllerCreates new object as a child of 'target' node- Specified by:
createin interfaceTreeController<Object>- Parameters:
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 set- Returns:
- created object
-
delete
Description copied from interface:TreeControllerDeletes given node- Specified by:
deletein interfaceTreeController<Object>- Parameters:
tree- after successful deletion, tree will be notified to update itselfnode- to delete
-
doubleClicked
Description copied from interface:TreeControllerCalled when given node was double clicked in tree- Specified by:
doubleClickedin interfaceTreeController<Object>- Parameters:
tree- to play with after whatever was donenode- which was double clicked
-
customAction
Description copied from interface:TreeControllerIf some custom actions were added to the tree, this method will be called for each of them- Specified by:
customActionin interfaceTreeController<Object>- Parameters:
tree- to play with if necessaryevent- original event that was sent when custom action button was clickednode- from selected tree item- Returns:
- whatever you implement
-