Package org.adempiere.webui.component
Class FavoriteSimpleTreeModel
java.lang.Object
org.zkoss.zul.AbstractTreeModel<org.zkoss.zul.TreeNode<E>>
org.zkoss.zul.DefaultTreeModel<Object>
org.adempiere.webui.component.SimpleTreeModel
org.adempiere.webui.component.FavoriteSimpleTreeModel
- All Implemented Interfaces:
Serializable
,org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
,org.zkoss.zul.ext.Openable<org.zkoss.zul.TreeNode<Object>>
,org.zkoss.zul.ext.Pageable
,org.zkoss.zul.ext.Selectable<org.zkoss.zul.TreeNode<Object>>
,org.zkoss.zul.ext.Sortable<org.zkoss.zul.TreeNode<Object>>
,org.zkoss.zul.ext.TreeOpenableModel
,org.zkoss.zul.ext.TreeSelectableModel
,org.zkoss.zul.PageableModel
,org.zkoss.zul.TreeitemRenderer<Object>
,org.zkoss.zul.TreeModel<org.zkoss.zul.TreeNode<Object>>
public class FavoriteSimpleTreeModel
extends SimpleTreeModel
implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, org.zkoss.zul.TreeitemRenderer<Object>
User Favorite Tree Model
- Since:
- June 20, 2017
- Author:
- Logilite Technologies
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zul.AbstractTreeModel
org.zkoss.zul.AbstractTreeModel.DefaultSelectionControl<E extends Object>, org.zkoss.zul.AbstractTreeModel.Path
-
Field Summary
Fields inherited from class org.zkoss.zul.AbstractTreeModel
_opens, _selection
Fields inherited from interface org.zkoss.zul.PageableModel
INTERNAL_EVENT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add new node to treevoid
addOnDropEventListener
(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener) Add listener for ON_DROP eventstatic FavoriteSimpleTreeModel
createFrom
(MTreeNode root) Creating Tree hierarchyorg.zkoss.zul.DefaultTreeNode<Object>
Get child nodestatic FavoriteSimpleTreeModel
initADTree
(org.zkoss.zul.Tree tree, String trxName) Tree Initializationboolean
void
onEvent
(org.zkoss.zk.ui.event.Event event) void
void
setItemDraggable
(boolean isDraggable) Set draggable or not draggable for each tree nodeMethods inherited from class org.adempiere.webui.component.SimpleTreeModel
addNode, find, getParent, getRoot, initADTree, initADTree, initADTree, initADTree, isTreeDrivenByValue, isValueDisplayed, nodeUpdated, removeNode, setIsValueDisplayed, setTreeDrivenByValue
Methods inherited from class org.zkoss.zul.DefaultTreeModel
addSelection, clone, getChild, getChildCount, getIndexOfChild, getPath, getSortDirection, isLeaf, isObjectOpened, isOpen, isSelected, removeFromSelection, removeOpenObject, removeSelection, setOpen, sort, sort
Methods inherited from class org.zkoss.zul.AbstractTreeModel
addOpenObject, addOpenPath, addOpenPaths, addPagingEventListener, addSelectionPath, addSelectionPaths, addToSelection, addTreeDataListener, afterSort, beforeSort, clearOpen, clearSelection, fireEvent, fireEvent, fireEvent, fireOpenChanged, fireSelectionChanged, getActivePage, getChild, getOpenCount, getOpenObjects, getOpenPath, getOpenPaths, getPageCount, getPageSize, getSelection, getSelectionControl, getSelectionCount, getSelectionPath, getSelectionPaths, isMultiple, isOpenEmpty, isPathOpened, isPathSelected, isSelectionEmpty, removeOpenPath, removeOpenPaths, removePagingEventListener, removeSelectionPath, removeSelectionPaths, removeTreeDataListener, setActivePage, setMultiple, setOpenObjects, setPageSize, setSelection, setSelectionControl
-
Field Details
-
MOBILE_TOOLBAR_CTX_MENU
- See Also:
-
-
Constructor Details
-
FavoriteSimpleTreeModel
- Parameters:
root
-
-
-
Method Details
-
initADTree
Tree Initialization- Parameters:
tree
-trxName
-- Returns:
FavoriteSimpleTreeModel
-
createFrom
Creating Tree hierarchy- Parameters:
root
- MTreeNode- Returns:
FavoriteSimpleTreeModel
-
render
- Specified by:
render
in interfaceorg.zkoss.zul.TreeitemRenderer<Object>
- Overrides:
render
in classSimpleTreeModel
-
onEvent
- Specified by:
onEvent
in interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
- Overrides:
onEvent
in classSimpleTreeModel
- Throws:
Exception
- See Also:
-
EventListener.onEvent(Event)
-
addNode
Add new node to tree- Overrides:
addNode
in classSimpleTreeModel
- Parameters:
newNode
-
-
getChild
public org.zkoss.zul.DefaultTreeNode<Object> getChild(org.zkoss.zul.DefaultTreeNode<Object> parent, int index) Get child node- Parameters:
parent
- Parent nodeindex
- Index of child node- Returns:
- DefaultTreeNode
-
addOnDropEventListener
public void addOnDropEventListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener) Description copied from class:SimpleTreeModel
Add listener for ON_DROP event- Overrides:
addOnDropEventListener
in classSimpleTreeModel
- Parameters:
listener
-
-
setItemDraggable
public void setItemDraggable(boolean isDraggable) Description copied from class:SimpleTreeModel
Set draggable or not draggable for each tree node- Overrides:
setItemDraggable
in classSimpleTreeModel
- Parameters:
isDraggable
-
-
isItemDraggable
public boolean isItemDraggable()- Overrides:
isItemDraggable
in classSimpleTreeModel
- Returns:
- true if item is draggable, false otherwise
-