JavaTM 2 Platform
Std. Ed. v1.3

javax.swing.tree
インタフェース TreeNode

既知のサブインタフェースの一覧:
MutableTreeNode
既知の実装クラスの一覧:
AbstractDocument.AbstractElement

public interface TreeNode

JTree 内のツリーノードとして使用できるオブジェクトに関する要求を定義します。

ツリーノードの詳細および使用例は、「The Java Tutorial」「How to Use Trees」を参照してください。


メソッドの概要
 Enumeration children()
          レシーバの子を Enumeration で返します。
 boolean getAllowsChildren()
          レシーバが子を許可する場合は true を返します。
 TreeNode getChildAt(int childIndex)
          インデックス childIndex にある子 TreeNode を返します。
 int getChildCount()
          レシーバが格納する子 TreeNode の数を返します。
 int getIndex(TreeNode node)
          レシーバの子の中で node のインデックスを返します。
 TreeNode getParent()
          レシーバの親 TreeNode を返します。
 boolean isLeaf()
          レシーバが葉である場合は true を返します。
 

メソッドの詳細

getChildAt

public TreeNode getChildAt(int childIndex)
インデックス childIndex にある子 TreeNode を返します。

getChildCount

public int getChildCount()
レシーバが格納する子 TreeNode の数を返します。

getParent

public TreeNode getParent()
レシーバの親 TreeNode を返します。

getIndex

public int getIndex(TreeNode node)
レシーバの子の中で node のインデックスを返します。レシーバが node を格納しない場合は、-1 が返されます。

getAllowsChildren

public boolean getAllowsChildren()
レシーバが子を許可する場合は true を返します。

isLeaf

public boolean isLeaf()
レシーバが葉である場合は true を返します。

children

public Enumeration children()
レシーバの子を Enumeration で返します。

JavaTM 2 Platform
Std. Ed. v1.3

バグや機能要求の報告
さらに詳しい API リファレンスおよび開発者ドキュメントについては、 Java 2 SDK SE Developer Documentation を参照してください。このドキュメントには、概念、用語の定義、回避策、 実用的なコード例など、開発者を対象にした詳細な解説が掲載されています。

Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.