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 SimplePivotHeaderNode
getChild(Object key)
Find child by node key.List<SimplePivotHeaderNode>
getChildren()
Returns the children of the node.int
getDepth()
Returns the depth of the node, 0 if root.PivotField
getField()
Return the corresponding field of the nodeString
getHash()
Return a hash string representing the node.Object
getKey()
Return the key of node.SimplePivotHeaderNode
getParent()
Returns the parent of the node.int
getSize(boolean asIfOpen)
TODOint
getSubtotalCount(boolean asIfOpen)
TODOSimplePivotHeaderTree
getTree()
Returns the tree of the node.protected IndexLinkedList<Object,SimplePivotHeaderNode>
initChildren()
boolean
isLeaf()
Returns true if the node has no child.boolean
isOpen()
Returns true is the node is open.boolean
isRoot()
Return true if root node.void
setOpen(boolean open)
Set the open state of the node.String
toString()
-
-
-
Constructor Detail
-
SimplePivotHeaderNode
public SimplePivotHeaderNode(SimplePivotHeaderTree tree)
-
SimplePivotHeaderNode
public SimplePivotHeaderNode(Object key, SimplePivotHeaderNode parent)
-
-
Method Detail
-
getTree
public SimplePivotHeaderTree getTree()
Description copied from interface:PivotHeaderNode
Returns the tree of the node.- Specified by:
getTree
in interfacePivotHeaderNode
- See Also:
PivotHeaderTree
-
getChildren
public List<SimplePivotHeaderNode> getChildren()
Description copied from interface:PivotHeaderNode
Returns the children of the node.- Specified by:
getChildren
in interfacePivotHeaderNode
-
getDepth
public int getDepth()
Description copied from interface:PivotHeaderNode
Returns the depth of the node, 0 if root.- Specified by:
getDepth
in interfacePivotHeaderNode
-
getKey
public Object getKey()
Description copied from interface:PivotHeaderNode
Return the key of node.- Specified by:
getKey
in interfacePivotHeaderNode
-
getParent
public SimplePivotHeaderNode getParent()
Description copied from interface:PivotHeaderNode
Returns the parent of the node.- Specified by:
getParent
in interfacePivotHeaderNode
-
getChild
public SimplePivotHeaderNode getChild(Object key)
Description copied from interface:PivotHeaderNode
Find child by node key.- Specified by:
getChild
in interfacePivotHeaderNode
- Returns:
- null if not found.
-
isLeaf
public boolean isLeaf()
Description copied from interface:PivotHeaderNode
Returns true if the node has no child.- Specified by:
isLeaf
in interfacePivotHeaderNode
-
isOpen
public boolean isOpen()
Description copied from interface:PivotHeaderNode
Returns true is the node is open.- Specified by:
isOpen
in interfacePivotHeaderNode
-
setOpen
public void setOpen(boolean open)
Description copied from interface:PivotHeaderNode
Set the open state of the node.- Specified by:
setOpen
in interfacePivotHeaderNode
-
getField
public PivotField getField()
Description copied from interface:PivotHeaderNode
Return the corresponding field of the node- Specified by:
getField
in 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:PivotHeaderNode
TODO- Specified by:
getSubtotalCount
in interfacePivotHeaderNode
-
getSize
public int getSize(boolean asIfOpen)
Description copied from interface:PivotHeaderNode
TODO- Specified by:
getSize
in interfacePivotHeaderNode
-
initChildren
protected IndexLinkedList<Object,SimplePivotHeaderNode> initChildren()
-
-