Class TreeViewCollectionBrowserTreeModel<N extends TreeViewCollectionBrowserNode>

  • All Implemented Interfaces:
    java.io.Serializable, org.zkoss.zul.ext.Openable<N>, org.zkoss.zul.ext.Pageable, org.zkoss.zul.ext.Selectable<N>, org.zkoss.zul.ext.TreeOpenableModel, org.zkoss.zul.ext.TreeSelectableModel, org.zkoss.zul.PageableModel, org.zkoss.zul.TreeModel<N>

    public class TreeViewCollectionBrowserTreeModel<N extends TreeViewCollectionBrowserNode>
    extends org.zkoss.zul.AbstractTreeModel<N>
    Tree model class for Collection Browser widget. Parametrized with node type.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int AUTO_EXPAND_CHILDREN_COUNT  
      • Fields inherited from class org.zkoss.zul.AbstractTreeModel

        _opens, _selection
      • Fields inherited from interface org.zkoss.zul.PageableModel

        INTERNAL_EVENT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      N getChild​(int[] path)  
      N getChild​(N parent, int index)  
      int getChildCount​(N parent)  
      N getNode​(java.lang.Object data)
      Gets tree node for specified data.
      protected N getNode​(java.lang.Object data, java.util.Collection<? extends TreeViewCollectionBrowserNode> nodes)  
      int[] getPath​(N node)  
      java.util.List<N> getTopLevelNodes()  
      protected boolean isDataSelectionChanged​(java.util.Collection<?> selection)  
      boolean isLeaf​(N node)  
      boolean isPathOpened​(int[] path)  
      void setDataSelection​(java.util.Collection<?> selection)
      Sets new section by specifying data to be selected (rather then nodes).
      • Methods inherited from class org.zkoss.zul.AbstractTreeModel

        addOpenObject, addOpenPath, addOpenPaths, addPagingEventListener, addSelectionPath, addSelectionPaths, addToSelection, addTreeDataListener, afterSort, beforeSort, clearOpen, clearSelection, clone, fireEvent, fireEvent, fireEvent, fireOpenChanged, fireSelectionChanged, getActivePage, getIndexOfChild, getOpenCount, getOpenObjects, getOpenPath, getOpenPaths, getPageCount, getPageSize, getRoot, getSelection, getSelectionControl, getSelectionCount, getSelectionPath, getSelectionPaths, isMultiple, isObjectOpened, isOpenEmpty, isPathSelected, isSelected, isSelectionEmpty, removeFromSelection, removeOpenObject, 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 Detail

      • AUTO_EXPAND_CHILDREN_COUNT

        public static final int AUTO_EXPAND_CHILDREN_COUNT
        See Also:
        Constant Field Values
    • Constructor Detail

      • TreeViewCollectionBrowserTreeModel

        public TreeViewCollectionBrowserTreeModel​(java.util.List<N> topLevelNodes)
    • Method Detail

      • getTopLevelNodes

        public java.util.List<N> getTopLevelNodes()
      • getChild

        public N getChild​(N parent,
                          int index)
      • getChildCount

        public int getChildCount​(N parent)
      • isLeaf

        public boolean isLeaf​(N node)
      • isPathOpened

        public boolean isPathOpened​(int[] path)
        Specified by:
        isPathOpened in interface org.zkoss.zul.ext.TreeOpenableModel
        Overrides:
        isPathOpened in class org.zkoss.zul.AbstractTreeModel<N extends TreeViewCollectionBrowserNode>
      • getNode

        public N getNode​(java.lang.Object data)
        Gets tree node for specified data. Only already opened nodes are taken under consideration
        Parameters:
        data - data of node to be found
        Returns:
        node found or null if there is no node assigned to provided data
      • setDataSelection

        public void setDataSelection​(java.util.Collection<?> selection)
        Sets new section by specifying data to be selected (rather then nodes).
        Parameters:
        selection - data to be selected
        See Also:
        AbstractTreeModel.setSelection(Collection)
      • isDataSelectionChanged

        protected boolean isDataSelectionChanged​(java.util.Collection<?> selection)