JavaTM 2 Platform
Std. Ed. v1.3

javax.swing.plaf
クラス TreeUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--javax.swing.plaf.TreeUI
直系の既知のサブクラス:
BasicTreeUI, MultiTreeUI

public abstract class TreeUI
extends ComponentUI

JTree 用のプラグイン可能な Look & Feel インタフェースです。


コンストラクタの概要
TreeUI()
           
 
メソッドの概要
abstract  void cancelEditing(JTree tree)
          現在の編集セッションを取り消します。
abstract  TreePath getClosestPathForLocation(JTree tree, int x, int y)
          x, y にもっとも近いノードへのパスを返します。
abstract  TreePath getEditingPath(JTree tree)
          編集中の要素に対するパスを返します。
abstract  Rectangle getPathBounds(JTree tree, TreePath path)
          パスの最後の項目が描画されるラベル部分を囲む Rectangle を返します。
abstract  TreePath getPathForRow(JTree tree, int row)
          渡された row のパスを返します。
abstract  int getRowCount(JTree tree)
          表示されている行数を返します。
abstract  int getRowForPath(JTree tree, TreePath path)
          パスで識別される最後の項目が可視である行を返します。
abstract  boolean isEditing(JTree tree)
          ツリーが編集中の場合に true を返します。
abstract  void startEditingAtPath(JTree tree, TreePath path)
          path の最後の項目を選択し、その項目の編集を試みます。
abstract  boolean stopEditing(JTree tree)
          現在の編集セッションを中止します。
 
クラス javax.swing.plaf.ComponentUI から継承したメソッド
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

TreeUI

public TreeUI()
メソッドの詳細

getPathBounds

public abstract Rectangle getPathBounds(JTree tree,
                                        TreePath path)
パスの最後の項目が描画されるラベル部分を囲む Rectangle を返します。パスのコンポーネントのどれかが現在有効な場合は、null が返されます。

getPathForRow

public abstract TreePath getPathForRow(JTree tree,
                                       int row)
渡された row のパスを返します。row が可視でない場合は、null が返されます。

getRowForPath

public abstract int getRowForPath(JTree tree,
                                  TreePath path)
パスで識別される最後の項目が可視である行を返します。パス内のどの要素も現在は可視でない場合は、-1 を返します。

getRowCount

public abstract int getRowCount(JTree tree)
表示されている行数を返します。

getClosestPathForLocation

public abstract TreePath getClosestPathForLocation(JTree tree,
                                                   int x,
                                                   int y)
x, y にもっとも近いノードへのパスを返します。現在可視のものがない場合は、null を返します。そうでない場合は、常に有効なパスを返します。返されたオブジェクトが正確に x, y にあるかどうかを判定する必要がある場合は、返されたパスの境界を取得して、x, y と比較します。

isEditing

public abstract boolean isEditing(JTree tree)
ツリーが編集中の場合に true を返します。編集中の項目を取得するには、getEditingPath() を使います。

stopEditing

public abstract boolean stopEditing(JTree tree)
現在の編集セッションを中止します。ツリーが編集中でない場合は、このメソッドは何も行いません。エディタが編集セッションの中止を許可した場合は、true を返します。

cancelEditing

public abstract void cancelEditing(JTree tree)
現在の編集セッションを取り消します。ツリーが編集中でない場合は、このメソッドは何も行いません。エディタが編集セッションの中止を許可した場合は、true を返します。

startEditingAtPath

public abstract void startEditingAtPath(JTree tree,
                                        TreePath path)
path の最後の項目を選択し、その項目の編集を試みます。CellEditor が選択された項目の編集を許可しない場合、編集は失敗します。

getEditingPath

public abstract TreePath getEditingPath(JTree tree)
編集中の要素に対するパスを返します。

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.