Class DefaultExplorerTreeModel
- java.lang.Object
-
- org.zkoss.zul.AbstractTreeModel<NavigationNode>
-
- com.hybris.cockpitng.widgets.common.explorertree.model.DefaultExplorerTreeModel
-
- All Implemented Interfaces:
RefreshableTreeModel<NavigationNode>,java.io.Serializable,java.lang.Cloneable,org.zkoss.zul.ext.Openable<NavigationNode>,org.zkoss.zul.ext.Pageable,org.zkoss.zul.ext.Selectable<NavigationNode>,org.zkoss.zul.ext.Sortable<NavigationNode>,org.zkoss.zul.ext.TreeOpenableModel,org.zkoss.zul.ext.TreeSelectableModel,org.zkoss.zul.PageableModel,org.zkoss.zul.TreeModel<NavigationNode>
public class DefaultExplorerTreeModel extends org.zkoss.zul.AbstractTreeModel<NavigationNode> implements RefreshableTreeModel<NavigationNode>, java.lang.Cloneable, org.zkoss.zul.ext.Sortable<NavigationNode>
Default tree model for the explorer tree widget.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringZK_SORT_ASCENDINGstatic java.lang.StringZK_SORT_DESCENDING
-
Constructor Summary
Constructors Constructor Description DefaultExplorerTreeModel(NavigationTree navTree)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Objectclone()protected java.util.List<NavigationNode>findChildren(NavigationNode parent)java.util.List<NavigationNode>findNodesByData(java.lang.Object data)Gets all nodes related to specified data.protected java.util.List<NavigationNode>findNodesWithWrappedData(java.lang.Object data)NavigationNodegetChild(NavigationNode parent, int index)intgetChildCount(NavigationNode parent)protected java.util.List<NavigationNode>getChildren(NavigationNode node)intgetIndexOfChild(NavigationNode parent, NavigationNode child)int[]getPath(NavigationNode child)NavigationNodegetRoot()java.lang.StringgetSortDirection(java.util.Comparator comparator)protected intindexOf(NavigationNode node, java.util.List<NavigationNode> children)Deprecated, for removal: This API element is subject to removal in a future version.since 1808, is no longer usedbooleanisLeaf(NavigationNode node)voidrefreshChildren(NavigationNode node, java.util.List<NavigationNode> children)Sets new children nodes of specified parent node and refreshes all data related to them.voidsort(java.util.Comparator<NavigationNode> comparator, boolean ascending)protected NavigationNodeunpackNavigationNodeDecorator(NavigationNode node)Deprecated, for removal: This API element is subject to removal in a future version.since 1808, is no longer used-
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, isObjectOpened, isOpenEmpty, isPathOpened, isPathSelected, isSelected, isSelectionEmpty, removeFromSelection, removeOpenObject, removeOpenPath, removeOpenPaths, removePagingEventListener, removeSelectionPath, removeSelectionPaths, removeTreeDataListener, setActivePage, setMultiple, setOpenObjects, setPageSize, setSelection, setSelectionControl
-
-
-
-
Field Detail
-
ZK_SORT_ASCENDING
public static final java.lang.String ZK_SORT_ASCENDING
- See Also:
- Constant Field Values
-
ZK_SORT_DESCENDING
public static final java.lang.String ZK_SORT_DESCENDING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultExplorerTreeModel
public DefaultExplorerTreeModel(NavigationTree navTree)
-
-
Method Detail
-
clone
public java.lang.Object clone()
- Overrides:
clonein classorg.zkoss.zul.AbstractTreeModel<NavigationNode>
-
getChild
public NavigationNode getChild(NavigationNode parent, int index)
- Specified by:
getChildin interfaceorg.zkoss.zul.TreeModel<NavigationNode>
-
findChildren
protected java.util.List<NavigationNode> findChildren(NavigationNode parent)
-
getChildCount
public int getChildCount(NavigationNode parent)
- Specified by:
getChildCountin interfaceorg.zkoss.zul.TreeModel<NavigationNode>
-
getIndexOfChild
public int getIndexOfChild(NavigationNode parent, NavigationNode child)
- Specified by:
getIndexOfChildin interfaceorg.zkoss.zul.TreeModel<NavigationNode>- Overrides:
getIndexOfChildin classorg.zkoss.zul.AbstractTreeModel<NavigationNode>
-
getRoot
public NavigationNode getRoot()
- Specified by:
getRootin interfaceorg.zkoss.zul.TreeModel<NavigationNode>- Overrides:
getRootin classorg.zkoss.zul.AbstractTreeModel<NavigationNode>
-
isLeaf
public boolean isLeaf(NavigationNode node)
- Specified by:
isLeafin interfaceorg.zkoss.zul.TreeModel<NavigationNode>
-
getChildren
protected java.util.List<NavigationNode> getChildren(NavigationNode node)
-
refreshChildren
public void refreshChildren(NavigationNode node, java.util.List<NavigationNode> children)
Description copied from interface:RefreshableTreeModelSets new children nodes of specified parent node and refreshes all data related to them.- Specified by:
refreshChildrenin interfaceRefreshableTreeModel<NavigationNode>- Parameters:
node- parent nodechildren- new children nodes
-
findNodesByData
public java.util.List<NavigationNode> findNodesByData(java.lang.Object data)
Description copied from interface:RefreshableTreeModelGets all nodes related to specified data.In case of dynamic trees, method should return only those nodes that are already known and avoid traversing through whole tree to gather all related nodes.
- Specified by:
findNodesByDatain interfaceRefreshableTreeModel<NavigationNode>- Parameters:
data- node data- Returns:
- list of known nodes that are related to data
-
findNodesWithWrappedData
protected java.util.List<NavigationNode> findNodesWithWrappedData(java.lang.Object data)
-
getPath
public int[] getPath(NavigationNode child)
- Specified by:
getPathin interfaceorg.zkoss.zul.TreeModel<NavigationNode>- Overrides:
getPathin classorg.zkoss.zul.AbstractTreeModel<NavigationNode>
-
indexOf
@Deprecated(since="1808", forRemoval=true) protected int indexOf(NavigationNode node, java.util.List<NavigationNode> children)Deprecated, for removal: This API element is subject to removal in a future version.since 1808, is no longer used
-
unpackNavigationNodeDecorator
@Deprecated(since="1808", forRemoval=true) protected NavigationNode unpackNavigationNodeDecorator(NavigationNode node)Deprecated, for removal: This API element is subject to removal in a future version.since 1808, is no longer used
-
sort
public void sort(java.util.Comparator<NavigationNode> comparator, boolean ascending)
- Specified by:
sortin interfaceorg.zkoss.zul.ext.Sortable<NavigationNode>
-
getSortDirection
public java.lang.String getSortDirection(java.util.Comparator comparator)
- Specified by:
getSortDirectionin interfaceorg.zkoss.zul.ext.Sortable<NavigationNode>
-
-