Package org.adempiere.webui.util
Class TreeUtils
java.lang.Object
org.adempiere.webui.util.TreeUtils
Helper methods for working with tree nodes
- Author:
- hengsin
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
collapseAll
(org.zkoss.zul.Tree tree) Collapse all nodesstatic void
collapseTree
(org.zkoss.zk.ui.Component treeObject, boolean isOpen) travel all node of tree, at selected node, call callback functionprotected static <T> void
collapseTreeModel
(org.zkoss.zul.ext.TreeOpenableModel treeModelOpenable, boolean isOpen, T treeNode) Collapse or expand tree nodesstatic void
expandAll
(org.zkoss.zul.Tree tree) Expand all nodesstatic boolean
isOnInitRenderPosted
(org.zkoss.zul.Tree tree) static void
traverse
(org.zkoss.zul.Treechildren treechildren, TreeItemAction action) Traverse treechildren and execution action on Treeitemstatic void
traverse
(org.zkoss.zul.TreeModel<Object> model, Object parent, TreeNodeAction action) Traverse tree model from parent and execution action on tree nodestatic void
traverse
(org.zkoss.zul.TreeModel<Object> model, TreeNodeAction action) Traverse tree model and execution action on tree nodestatic void
traverse
(org.zkoss.zul.Tree tree, TreeItemAction action) Traverse tree and execution action on Treeitem
-
Constructor Details
-
TreeUtils
public TreeUtils()
-
-
Method Details
-
collapseAll
public static void collapseAll(org.zkoss.zul.Tree tree) Collapse all nodes- Parameters:
tree
-
-
expandAll
public static void expandAll(org.zkoss.zul.Tree tree) Expand all nodes- Parameters:
tree
-
-
traverse
Traverse tree and execution action on Treeitem- Parameters:
tree
-action
-
-
traverse
Traverse treechildren and execution action on Treeitem- Parameters:
treechildren
-action
-
-
traverse
Traverse tree model and execution action on tree node- Parameters:
model
-action
-
-
traverse
public static void traverse(org.zkoss.zul.TreeModel<Object> model, Object parent, TreeNodeAction action) Traverse tree model from parent and execution action on tree node- Parameters:
model
-parent
-action
-
-
isOnInitRenderPosted
public static boolean isOnInitRenderPosted(org.zkoss.zul.Tree tree) - Parameters:
tree
-- Returns:
- true if onInitRender event have been posted
-
collapseTree
public static void collapseTree(org.zkoss.zk.ui.Component treeObject, boolean isOpen) travel all node of tree, at selected node, call callback function- Parameters:
treeObject
- Tree or parent of TreeisOpen
-
-
collapseTreeModel
protected static <T> void collapseTreeModel(org.zkoss.zul.ext.TreeOpenableModel treeModelOpenable, boolean isOpen, T treeNode) Collapse or expand tree nodes- Type Parameters:
T
-- Parameters:
treeModelOpenable
-isOpen
- true to expand, false to collapsetreeNode
- node to expand from, null to expand from root node
-