org.zkoss.pivot.impl
Class SimplePivotHeaderNode

java.lang.Object
  extended by org.zkoss.pivot.impl.SimplePivotHeaderNode
All Implemented Interfaces:
PivotHeaderNode

public class SimplePivotHeaderNode
extends java.lang.Object
implements PivotHeaderNode

A simple implementation of PivotHeaderNode

Author:
simonpai

Constructor Summary
SimplePivotHeaderNode(java.lang.Object key, SimplePivotHeaderNode parent)
           
SimplePivotHeaderNode(SimplePivotHeaderTree tree)
           
 
Method Summary
 SimplePivotHeaderNode getChild(java.lang.Object key)
          Find child by node key.
 java.util.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 node
 java.lang.String getHash()
          Return a hash string representing the node.
 java.lang.Object getKey()
          Return the key of node.
 SimplePivotHeaderNode getParent()
          Returns the parent of the node.
 int getSize(boolean asIfOpen)
          TODO
 int getSubtotalCount(boolean asIfOpen)
          TODO
 SimplePivotHeaderTree getTree()
          Returns the tree of the node.
protected  IndexLinkedList<java.lang.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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimplePivotHeaderNode

public SimplePivotHeaderNode(SimplePivotHeaderTree tree)

SimplePivotHeaderNode

public SimplePivotHeaderNode(java.lang.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 interface PivotHeaderNode
See Also:
PivotHeaderTree

getChildren

public java.util.List<SimplePivotHeaderNode> getChildren()
Description copied from interface: PivotHeaderNode
Returns the children of the node.

Specified by:
getChildren in interface PivotHeaderNode

getDepth

public int getDepth()
Description copied from interface: PivotHeaderNode
Returns the depth of the node, 0 if root.

Specified by:
getDepth in interface PivotHeaderNode

getKey

public java.lang.Object getKey()
Description copied from interface: PivotHeaderNode
Return the key of node.

Specified by:
getKey in interface PivotHeaderNode

getParent

public SimplePivotHeaderNode getParent()
Description copied from interface: PivotHeaderNode
Returns the parent of the node.

Specified by:
getParent in interface PivotHeaderNode

getChild

public SimplePivotHeaderNode getChild(java.lang.Object key)
Description copied from interface: PivotHeaderNode
Find child by node key.

Specified by:
getChild in interface PivotHeaderNode
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 interface PivotHeaderNode

isOpen

public boolean isOpen()
Description copied from interface: PivotHeaderNode
Returns true is the node is open.

Specified by:
isOpen in interface PivotHeaderNode

setOpen

public void setOpen(boolean open)
Description copied from interface: PivotHeaderNode
Set the open state of the node.

Specified by:
setOpen in interface PivotHeaderNode

getField

public PivotField getField()
Description copied from interface: PivotHeaderNode
Return the corresponding field of the node

Specified by:
getField in interface PivotHeaderNode

isRoot

public boolean isRoot()
Return true if root node.


getHash

public java.lang.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 interface PivotHeaderNode

getSize

public int getSize(boolean asIfOpen)
Description copied from interface: PivotHeaderNode
TODO

Specified by:
getSize in interface PivotHeaderNode

initChildren

protected IndexLinkedList<java.lang.Object,SimplePivotHeaderNode> initChildren()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2013. All Rights Reserved.