Package org.zkoss.pivot.impl
Class SimplePivotHeaderNode
- java.lang.Object
-
- org.zkoss.pivot.impl.SimplePivotHeaderNode
-
- All Implemented Interfaces:
PivotHeaderNode
public class SimplePivotHeaderNode extends Object implements PivotHeaderNode
A simple implementation of PivotHeaderNode- Author:
- simonpai
-
-
Constructor Summary
Constructors Constructor Description SimplePivotHeaderNode(Object key, SimplePivotHeaderNode parent)SimplePivotHeaderNode(SimplePivotHeaderTree tree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimplePivotHeaderNodegetChild(Object key)Find child by node key.List<SimplePivotHeaderNode>getChildren()Returns the children of the node.intgetDepth()Returns the depth of the node, 0 if root.PivotFieldgetField()Return the corresponding field of the nodeStringgetHash()Return a hash string representing the node.ObjectgetKey()Return the key of node.SimplePivotHeaderNodegetParent()Returns the parent of the node.intgetSize(boolean asIfOpen)TODOintgetSubtotalCount(boolean asIfOpen)TODOSimplePivotHeaderTreegetTree()Returns the tree of the node.protected IndexLinkedList<Object,SimplePivotHeaderNode>initChildren()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.StringtoString()
-
-
-
Constructor Detail
-
SimplePivotHeaderNode
public SimplePivotHeaderNode(SimplePivotHeaderTree tree)
-
SimplePivotHeaderNode
public SimplePivotHeaderNode(Object key, SimplePivotHeaderNode parent)
-
-
Method Detail
-
getTree
public SimplePivotHeaderTree getTree()
Description copied from interface:PivotHeaderNodeReturns the tree of the node.- Specified by:
getTreein interfacePivotHeaderNode- See Also:
PivotHeaderTree
-
getChildren
public List<SimplePivotHeaderNode> 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
public Object getKey()
Description copied from interface:PivotHeaderNodeReturn the key of node.- Specified by:
getKeyin interfacePivotHeaderNode
-
getParent
public SimplePivotHeaderNode getParent()
Description copied from interface:PivotHeaderNodeReturns the parent of the node.- Specified by:
getParentin interfacePivotHeaderNode
-
getChild
public SimplePivotHeaderNode getChild(Object key)
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
public PivotField 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
public String 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
protected IndexLinkedList<Object,SimplePivotHeaderNode> initChildren()
-
-