org.zkoss.zul
Class SimpleTreeNode

java.lang.Object
  extended by org.zkoss.zul.SimpleTreeNode
All Implemented Interfaces:
java.io.Serializable

public class SimpleTreeNode
extends java.lang.Object
implements java.io.Serializable

The treenode for SimpleTreeModel Note: It assumes the content is immutable

Since:
ZK 3.0.0
Author:
Jeff
See Also:
Serialized Form

Constructor Summary
SimpleTreeNode(java.lang.Object data, java.util.List children)
          Constructor
 
Method Summary
 java.lang.Object getChildAt(int childIndex)
          Returns the child SimpleTreeNode at index childIndex.
 int getChildCount()
          Returns the number of children SimpleTreeNodes the receiver contains.
 java.util.List getChildren()
          Return children of the receiver
 java.lang.Object getData()
          Return data of the receiver
 boolean isLeaf()
          Returns true if the receiver is a leaf.
 java.lang.String toString()
          Return data.toString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleTreeNode

public SimpleTreeNode(java.lang.Object data,
                      java.util.List children)
Constructor

Parameters:
data - data of the receiver
children - children of the receiver
Notice: Only SimpleTreeNode can be contained in The List children
Method Detail

getData

public java.lang.Object getData()
Return data of the receiver

Returns:
data of the receiver

getChildren

public java.util.List getChildren()
Return children of the receiver

Returns:
children of the receiver

toString

public java.lang.String toString()
Return data.toString(). If data is null, return String "Data is null"

Overrides:
toString in class java.lang.Object
Returns:
data.toString(). If data is null, return String "Data is null"

isLeaf

public boolean isLeaf()
Returns true if the receiver is a leaf.

Returns:
true if the receiver is a leaf.

getChildAt

public java.lang.Object getChildAt(int childIndex)
Returns the child SimpleTreeNode at index childIndex.

Returns:
the child SimpleTreeNode at index childIndex.

getChildCount

public int getChildCount()
Returns the number of children SimpleTreeNodes the receiver contains.

Returns:
the number of children SimpleTreeNodes the receiver contains.


Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo