yu.ac.bg.etf.javaqx.qswing.tree
Interface TreeNode

All Known Subinterfaces:
MutableTreeNode
All Known Implementing Classes:
DefaultMutableTreeNode

public interface TreeNode

Tree Node Interface.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Method Summary
 java.util.Iterator children()
          Returns iterator over the children of the node.
 boolean getAllowsChildren()
          Returns true if the node allows children.
 TreeNode getChildAt(int index)
          Returns child at the specified index.
 int getChildCount()
          Returns the number of children.
 int getIndex(TreeNode node)
          Returns index of specified node or -1 if there is no such node.
 TreeNode getParent()
          Returns parent of the node.
 boolean isLeaf()
          Returns true if the node is leaf.
 

Method Detail

getParent

public TreeNode getParent()
Returns parent of the node.

Returns:
parent of the node

isLeaf

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

Returns:
true if the node is leaf

getAllowsChildren

public boolean getAllowsChildren()
Returns true if the node allows children.

Returns:
true if the node allows children

getChildCount

public int getChildCount()
Returns the number of children.

Returns:
the number of children

getChildAt

public TreeNode getChildAt(int index)
Returns child at the specified index.

Parameters:
index - the child index
Returns:
child at the specified index

getIndex

public int getIndex(TreeNode node)
Returns index of specified node or -1 if there is no such node.

Parameters:
node - the node
Returns:
index of specified node or -1 if there is no such node

children

public java.util.Iterator children()
Returns iterator over the children of the node.

Returns:
iterator over the children of the node


Copyright © 2007 ETF and contributors. All Rights Reserved.