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
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.zkoss.zul.AbstractTreeModel

    _opens, _selection

    Fields inherited from interface org.zkoss.zul.PageableModel

    INTERNAL_EVENT
  • Constructor Summary

    Constructors
    Constructor
    Description
    FavoriteSimpleTreeModel(org.zkoss.zul.DefaultTreeNode<Object> root)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addNode(org.zkoss.zul.DefaultTreeNode<Object> newNode)
    Add new node to tree
    void
    addOnDropEventListener(org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
    Add listener for ON_DROP event
    Creating Tree hierarchy
    org.zkoss.zul.DefaultTreeNode<Object>
    getChild(org.zkoss.zul.DefaultTreeNode<Object> parent, int index)
    Get child node
    initADTree(org.zkoss.zul.Tree tree, String trxName)
    Tree Initialization
    boolean
     
    void
    onEvent(org.zkoss.zk.ui.event.Event event)
     
    void
    render(org.zkoss.zul.Treeitem ti, Object node, int index)
     
    void
    setItemDraggable(boolean isDraggable)
    Set draggable or not draggable for each tree node

    Methods inherited from class org.zkoss.zul.DefaultTreeModel

    clone, getChild, getChildCount, getIndexOfChild, getPath, getSortDirection, isLeaf, isObjectOpened, isSelected, removeFromSelection, removeOpenObject, 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, getTotalSize, getTreeDataListeners, isMultiple, isOpenEmpty, isPathOpened, isPathSelected, isSelectionEmpty, removeOpenPath, removeOpenPaths, removePagingEventListener, removeSelectionPath, removeSelectionPaths, removeTreeDataListener, setActivePage, setMultiple, setOpenObjects, setPageSize, setSelection, setSelectionControl

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • FavoriteSimpleTreeModel

      public FavoriteSimpleTreeModel(org.zkoss.zul.DefaultTreeNode<Object> root)
      Parameters:
      root -
  • Method Details

    • initADTree

      public static FavoriteSimpleTreeModel initADTree(org.zkoss.zul.Tree tree, String trxName)
      Tree Initialization
      Parameters:
      tree -
      trxName -
      Returns:
      FavoriteSimpleTreeModel
    • createFrom

      public static FavoriteSimpleTreeModel createFrom(MTreeNode root)
      Creating Tree hierarchy
      Parameters:
      root - MTreeNode
      Returns:
      FavoriteSimpleTreeModel
    • render

      public void render(org.zkoss.zul.Treeitem ti, Object node, int index)
      Specified by:
      render in interface org.zkoss.zul.TreeitemRenderer<Object>
      Overrides:
      render in class SimpleTreeModel
    • onEvent

      public void onEvent(org.zkoss.zk.ui.event.Event event) throws Exception
      Specified by:
      onEvent in interface org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
      Overrides:
      onEvent in class SimpleTreeModel
      Throws:
      Exception
      See Also:
      • EventListener.onEvent(Event)
    • addNode

      public void addNode(org.zkoss.zul.DefaultTreeNode<Object> newNode)
      Add new node to tree
      Overrides:
      addNode in class SimpleTreeModel
      Parameters:
      newNode -
    • getChild

      public org.zkoss.zul.DefaultTreeNode<Object> getChild(org.zkoss.zul.DefaultTreeNode<Object> parent, int index)
      Get child node
      Parameters:
      parent - Parent node
      index - 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 class SimpleTreeModel
      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 class SimpleTreeModel
      Parameters:
      isDraggable -
    • isItemDraggable

      public boolean isItemDraggable()
      Overrides:
      isItemDraggable in class SimpleTreeModel
      Returns:
      true if item is draggable, false otherwise