Package org.zkoss.pivot.impl
Class SimplePivotHeaderNode
java.lang.Object
org.zkoss.pivot.impl.SimplePivotHeaderNode
- All Implemented Interfaces:
PivotHeaderNode
A simple implementation of PivotHeaderNode
- Author:
- simonpai
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFind child by node key.Returns the children of the node.intgetDepth()Returns the depth of the node, 0 if root.getField()Return the corresponding field of the nodegetHash()Return a hash string representing the node.getKey()Return the key of node.Returns the parent of the node.intgetSize(boolean asIfOpen) TODOintgetSubtotalCount(boolean asIfOpen) TODOgetTree()Returns the tree of the node.protected IndexLinkedList<Object,SimplePivotHeaderNode> booleanisLeaf()Returns true if the node has no child.booleanisOpen()Returns true is the node is open.booleanisRoot()Return true if root node.voidsetOpen(boolean open) Set the open state of the node.toString()
-
Constructor Details
-
SimplePivotHeaderNode
-
SimplePivotHeaderNode
-
-
Method Details
-
getTree
Description copied from interface:PivotHeaderNodeReturns the tree of the node.- Specified by:
getTreein interfacePivotHeaderNode- See Also:
-
getChildren
Description copied from interface:PivotHeaderNodeReturns the children of the node.- Specified by:
getChildrenin interfacePivotHeaderNode
-
getDepth
public int getDepth()Description copied from interface:PivotHeaderNodeReturns the depth of the node, 0 if root.- Specified by:
getDepthin interfacePivotHeaderNode
-
getKey
Description copied from interface:PivotHeaderNodeReturn the key of node.- Specified by:
getKeyin interfacePivotHeaderNode
-
getParent
Description copied from interface:PivotHeaderNodeReturns the parent of the node.- Specified by:
getParentin interfacePivotHeaderNode
-
getChild
Description copied from interface:PivotHeaderNodeFind child by node key.- Specified by:
getChildin interfacePivotHeaderNode- Returns:
- null if not found.
-
isLeaf
public boolean isLeaf()Description copied from interface:PivotHeaderNodeReturns true if the node has no child.- Specified by:
isLeafin interfacePivotHeaderNode
-
isOpen
public boolean isOpen()Description copied from interface:PivotHeaderNodeReturns true is the node is open.- Specified by:
isOpenin interfacePivotHeaderNode
-
setOpen
public void setOpen(boolean open) Description copied from interface:PivotHeaderNodeSet the open state of the node.- Specified by:
setOpenin interfacePivotHeaderNode
-
getField
Description copied from interface:PivotHeaderNodeReturn the corresponding field of the node- Specified by:
getFieldin interfacePivotHeaderNode
-
isRoot
public boolean isRoot()Return true if root node. -
getHash
Return a hash string representing the node. Used by model. -
getSubtotalCount
public int getSubtotalCount(boolean asIfOpen) Description copied from interface:PivotHeaderNodeTODO- Specified by:
getSubtotalCountin interfacePivotHeaderNode
-
getSize
public int getSize(boolean asIfOpen) Description copied from interface:PivotHeaderNodeTODO- Specified by:
getSizein interfacePivotHeaderNode
-
initChildren
-
toString
-