クラス
javax.swing.tree.TreePathの使用

TreePathを使用するパッケージ 
パッケージ 説明
javax.swing
すべてのプラットフォーム上で可能なかぎり同じように機能する「軽量」(Java共通言語)コンポーネントのセットを提供します。
javax.swing.event
Swingコンポーネントによってトリガーされるイベントを提供します。
javax.swing.plaf
1つのインタフェースおよび多くのabstractクラスを提供しており、Swingはプラグイン可能なLook & Feel機能を提供するためにこれらを利用します。
javax.swing.plaf.basic
基本Look & Feelに従って構築されたユーザー・インタフェース・オブジェクトを提供します。
javax.swing.plaf.multi
複数のLook & Feelを結合するユーザー・インタフェース・オブジェクトを提供します。
javax.swing.tree
javax.swing.JTreeを処理するためのクラスとインタフェースを提供します。
  • javax.swingでのTreePathの使用

    TreePathを返すjavax.swing内のメソッド 
    修飾子と型 メソッド 説明
    TreePath JTree.getAnchorSelectionPath()
    アンカーと識別されたパスを返します。
    TreePath JTree.getClosestPathForLocation​(int x, int y)
    x、yにもっとも近いノードへのパスを返します。
    TreePath JTree.getEditingPath()
    現在編集されている要素のパスを返します。
    TreePath JTree.getLeadSelectionPath()
    リードと識別されたパスを返します。
    TreePath JTree.getNextMatch​(String prefix, int startingRow, Position.Bias bias)
    prefixで始まる次のツリー要素へのTreePathを返します。
    TreePath JTree.DropLocation.getPath()
    ドロップされたデータをツリー内のどこに配置するべきかを指定するパスを返します。
    protected TreePath[] JTree.getPathBetweenRows​(int index0, int index1)
    指定された行の間(この行を含む)のパスを返します。
    TreePath JTree.getPathForLocation​(int x, int y)
    指定された位置にあるノードのパスを返します。
    TreePath JTree.getPathForRow​(int row)
    指定された行のパスを返します。
    TreePath JTree.getSelectionPath()
    選択された最初のノードのパスを返します。
    TreePath[] JTree.getSelectionPaths()
    選択されたすべての値のパスを返します。
    TreePath型の引数を持つ型を返すjavax.swing内のメソッド 
    修飾子と型 メソッド 説明
    protected Enumeration<TreePath> JTree.getDescendantToggledPaths​(TreePath parent)
    parentの下位ノードであり、展開されているTreePathsEnumerationを返します。
    Enumeration<TreePath> JTree.getExpandedDescendants​(TreePath parent)
    現在展開されているパスparentの下位ノードから成るEnumerationを返します。
    TreePath型のパラメータを持つjavax.swing内のメソッド 
    修飾子と型 メソッド 説明
    void JTree.addSelectionPath​(TreePath path)
    指定されたTreePathによって識別されるノードを現在の選択に追加します。
    void JTree.addSelectionPaths​(TreePath[] paths)
    パスの配列の各パスを現在の選択に追加します。
    void JTree.EmptySelectionModel.addSelectionPaths​(TreePath[] paths)
    これをオーバーライドしても何も行われません。EmptySelectionModelは選択を許可しません。
    void JTree.collapsePath​(TreePath path)
    指定されたパスによって識別されるノードが収納され、表示可能になるようにします。
    void JTree.expandPath​(TreePath path)
    指定されたパスによって識別されるノードが展開され、表示可能になるようにします。
    void JTree.fireTreeCollapsed​(TreePath path)
    このイベント・タイプの通知対象として登録されているすべてのリスナーに通知します。
    void JTree.fireTreeExpanded​(TreePath path)
    このイベント・タイプの通知対象として登録されているすべてのリスナーに通知します。
    void JTree.fireTreeWillCollapse​(TreePath path)
    このイベント・タイプの通知対象として登録されているすべてのリスナーに通知します。
    void JTree.fireTreeWillExpand​(TreePath path)
    このイベント・タイプの通知対象として登録されているすべてのリスナーに通知します。
    protected Enumeration<TreePath> JTree.getDescendantToggledPaths​(TreePath parent)
    parentの下位ノードであり、展開されているTreePathsEnumerationを返します。
    Enumeration<TreePath> JTree.getExpandedDescendants​(TreePath parent)
    現在展開されているパスparentの下位ノードから成るEnumerationを返します。
    Rectangle JTree.getPathBounds​(TreePath path)
    指定されたノードが描画されるRectangleを返します。
    int JTree.getRowForPath​(TreePath path)
    指定されたパスによって識別されるノードを表示する行を返します。
    boolean JTree.hasBeenExpanded​(TreePath path)
    パスによって識別されるノードが今までに展開されたことがある場合にtrueを返します。
    boolean JTree.isCollapsed​(TreePath path)
    パスによって識別される値が現在収納されている場合にtrueを返します。このメソッドは、パスにある値が現在表示されていない場合はfalseを返します。
    boolean JTree.isExpanded​(TreePath path)
    パスによって識別されるノードが現在展開されている場合にtrueを返します。
    boolean JTree.isPathEditable​(TreePath path)
    isEditableを返します。
    boolean JTree.isPathSelected​(TreePath path)
    パスによって識別される項目が現在選択されている場合にtrueを返します。
    boolean JTree.isVisible​(TreePath path)
    パスによって識別される値が現在表示可能である場合、つまりそれがルートであるか、そのすべての親が展開されている場合にtrueを返します。
    void JTree.makeVisible​(TreePath path)
    パスによって識別されるノードが現在表示可能であるようにします。
    protected boolean JTree.removeDescendantSelectedPaths​(TreePath path, boolean includePath)
    pathの下位ノードである選択されたすべてのパスを削除します。
    void JTree.removeSelectionPath​(TreePath path)
    指定されたパスによって識別されるノードを現在の選択から削除します。
    void JTree.EmptySelectionModel.removeSelectionPaths​(TreePath[] paths)
    これをオーバーライドしても何も行われません。EmptySelectionModelは選択を許可しません。
    void JTree.removeSelectionPaths​(TreePath[] paths)
    指定されたパスによって識別されるノードを現在の選択から削除します。
    void JTree.scrollPathToVisible​(TreePath path)
    パスにあるすべてのパス・コンポーネント(最後のパス・コンポーネントは除く)を展開し、パスによって指定されるノードが表示されるようにスクロールします。
    void JTree.setAnchorSelectionPath​(TreePath newPath)
    アンカーと識別されたパスを設定します。
    protected void JTree.setExpandedState​(TreePath path, boolean state)
    このJTreeの展開状態を設定します。
    void JTree.setLeadSelectionPath​(TreePath newPath)
    リードとして識別するパスを設定します。
    void JTree.setSelectionPath​(TreePath path)
    指定されたパスによって識別されるノードを選択します。
    void JTree.EmptySelectionModel.setSelectionPaths​(TreePath[] paths)
    これをオーバーライドしても何も行われません。EmptySelectionModelは選択を許可しません。
    void JTree.setSelectionPaths​(TreePath[] paths)
    指定されたパスの配列によって識別されるノードを選択します。
    void JTree.startEditingAtPath​(TreePath path)
    指定されたパスによって識別されるノードを選択し、編集を開始します。
    TreePath型の型引数を持つjavax.swing内のメソッド・パラメータ 
    修飾子と型 メソッド 説明
    protected void JTree.removeDescendantToggledPaths​(Enumeration<TreePath> toRemove)
    toRemoveにある、展開されているTreePathsの下位ノードを削除します。
    TreePath型のパラメータを持つjavax.swing内のコンストラクタ 
    コンストラクタ 説明
    AccessibleJTreeNode​(JTree t, TreePath p, Accessible ap)
    AccessibleJTreeNodeを構築します。
  • javax.swing.eventでのTreePathの使用

    TreePathとして宣言されているjavax.swing.event内のフィールド 
    修飾子と型 フィールド 説明
    protected TreePath TreeSelectionEvent.newLeadSelectionPath
    パスが変更されたあとのleadSelectionPathです。nullの場合もあります。
    protected TreePath TreeSelectionEvent.oldLeadSelectionPath
    パスが変更される前のleadSelectionPathです。nullの場合もあります。
    protected TreePath TreeExpansionEvent.path
    このイベントが表す値へのパスです。
    protected TreePath TreeModelEvent.path
    変更されたノードの親へのパスです。
    protected TreePath[] TreeSelectionEvent.paths
    このイベントが表すパスです。
    TreePathを返すjavax.swing.event内のメソッド 
    修飾子と型 メソッド 説明
    TreePath TreeSelectionEvent.getNewLeadSelectionPath()
    現在のリード・パスを返します。
    TreePath TreeSelectionEvent.getOldLeadSelectionPath()
    以前にリード・パスだったパスを返します。
    TreePath TreeExpansionEvent.getPath()
    展開または折りたたみが行われている値へのパスを返します。
    TreePath TreeSelectionEvent.getPath()
    最初のパス要素を返します。
    TreePath[] TreeSelectionEvent.getPaths()
    選択範囲で追加または削除されたパスを返します。
    TreePath TreeModelEvent.getTreePath()
    treeStructureChangedを除くすべてのイベントに対して、変更されたノードの親を返します。
    TreePath型のパラメータを持つjavax.swing.event内のメソッド 
    修飾子と型 メソッド 説明
    boolean TreeSelectionEvent.isAddedPath​(TreePath path)
    指定されたパスが選択範囲に追加されたかどうかを返します。
    TreePath型のパラメータを持つjavax.swing.event内のコンストラクタ 
    コンストラクタ 説明
    TreeExpansionEvent​(Object source, TreePath path)
    TreeExpansionEventオブジェクトを構築します。
    TreeModelEvent​(Object source, TreePath path)
    ノード構造が何らかの方法で変更されたときに、イベントを生成するために使用します。変更されたサブツリーのルートへのパスをTreePathオブジェクトとして指定します。
    TreeModelEvent​(Object source, TreePath path, int[] childIndices, Object[] children)
    ノードが変更、挿入、または削除されたときに、イベントを生成するために使用します。変更された項目の親へのパスをTreePathオブジェクトとして指定します。
    TreeSelectionEvent​(Object source, TreePath[] paths, boolean[] areNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
    TreeSelectionModelの選択の変更を表します。
    TreeSelectionEvent​(Object source, TreePath path, boolean isNew, TreePath oldLeadSelectionPath, TreePath newLeadSelectionPath)
    TreeSelectionModelの選択の変更を表します。
  • javax.swing.plafでのTreePathの使用

    TreePathを返すjavax.swing.plaf内のメソッド 
    修飾子と型 メソッド 説明
    abstract TreePath TreeUI.getClosestPathForLocation​(JTree tree, int x, int y)
    x、yにもっとも近いノードへのパスを返します。
    abstract TreePath TreeUI.getEditingPath​(JTree tree)
    編集中の要素へのパスを返します。
    abstract TreePath TreeUI.getPathForRow​(JTree tree, int row)
    渡されたrowのパスを返します。
    TreePath型のパラメータを持つjavax.swing.plaf内のメソッド 
    修飾子と型 メソッド 説明
    abstract Rectangle TreeUI.getPathBounds​(JTree tree, TreePath path)
    パスの最後の項目が描画されるラベル部分を囲むRectangleを返します。
    abstract int TreeUI.getRowForPath​(JTree tree, TreePath path)
    pathで識別される最後の項目が可視である行を返します。
    abstract void TreeUI.startEditingAtPath​(JTree tree, TreePath path)
    pathの最後の項目を選択し、その項目の編集を試みます。
  • javax.swing.plaf.basicでのTreePathの使用

    TreePathとして宣言されているjavax.swing.plaf.basic内のフィールド 
    修飾子と型 フィールド 説明
    protected TreePath BasicTreeUI.editingPath
    編集中のパスです。
    TreePath型の型パラメータを持つjavax.swing.plaf.basic内のフィールド 
    修飾子と型 フィールド 説明
    protected Hashtable<TreePath,​Boolean> BasicTreeUI.drawingCache
    垂直線の描画を最小化するために使われます。
    TreePathを返すjavax.swing.plaf.basic内のメソッド 
    修飾子と型 メソッド 説明
    TreePath BasicTreeUI.getClosestPathForLocation​(JTree tree, int x, int y)
    x、yにもっとも近いノードへのパスを返します。
    TreePath BasicTreeUI.getEditingPath​(JTree tree)
    編集中の要素へのパスを返します。
    protected TreePath BasicTreeUI.getLastChildPath​(TreePath parent)
    parentの最後の子のパスを返します。
    TreePath BasicTreeUI.getPathForRow​(JTree tree, int row)
    渡されたrowのパスを返します。
    TreePath型のパラメータを持つjavax.swing.plaf.basic内のメソッド 
    修飾子と型 メソッド 説明
    protected void BasicTreeUI.checkForClickInExpandControl​(TreePath path, int mouseX, int mouseY)
    mouseXおよびmouseYrowの展開または折りたたみの領域にある場合、このメソッドは行の展開状態を切り替えます。
    protected TreePath BasicTreeUI.getLastChildPath​(TreePath parent)
    parentの最後の子のパスを返します。
    Rectangle BasicTreeUI.getPathBounds​(JTree tree, TreePath path)
    パスの最後の項目が描画されるラベル部分を囲むRectangleを返します。
    int BasicTreeUI.getRowForPath​(JTree tree, TreePath path)
    pathで識別される最後の項目が可視である行を返します。
    protected void BasicTreeUI.handleExpandControlClick​(TreePath path, int mouseX, int mouseY)
    ユーザーが特定の行をクリックするとメッセージが送られ、toggleExpandStateが呼び出されます。
    protected boolean BasicTreeUI.isLocationInExpandControl​(TreePath path, int mouseX, int mouseY)
    mouseXmouseYが、ノードを展開/折りたたむために使用される行の領域に入る場合はtrueを返し、rowのノードはリーフを表しません。
    protected void BasicTreeUI.paintExpandControl​(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
    行の展開(切り替え)部分をペイントします。
    protected void BasicTreeUI.paintHorizontalPartOfLeg​(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
    脚の水平部分をペイントします。
    protected void BasicTreeUI.paintRow​(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
    行のレンダラ部分をペイントします。
    protected void BasicTreeUI.paintVerticalPartOfLeg​(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
    脚の垂直部分をペイントします。
    protected void BasicTreeUI.pathWasCollapsed​(TreePath path)
    VisibleTreeNodeから折りたたまれた後にメッセージが送られます。
    protected void BasicTreeUI.pathWasExpanded​(TreePath path)
    VisibleTreeNodeから展開された後にメッセージが送られます。
    protected void BasicTreeUI.selectPathForEvent​(TreePath path, MouseEvent event)
    特定の行のMouseEventに基づいて選択を更新するようにメッセージを送りました。
    protected boolean BasicTreeUI.shouldPaintExpandControl​(TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
    (toggle)コントロールを展開して指定された行に描画する必要がある場合は、trueを返します。
    protected boolean BasicTreeUI.startEditing​(TreePath path, MouseEvent event)
    cellEditorがあり、shouldSelectCelltrueを返した場合、ノードの編集を開始します。
    void BasicTreeUI.startEditingAtPath​(JTree tree, TreePath path)
    pathの最後の項目を選択し、その項目の編集を試みます。
    protected void BasicTreeUI.toggleExpandState​(TreePath path)
    パスが展開されてない場合は展開し、行が展開されている場合は折りたたみます。
    protected void BasicTreeUI.updateExpandedDescendants​(TreePath path)
    ツリーから展開されている子孫を取得し、ツリー状態に転送することで、pathのすべての子孫の展開状態を更新します。
  • javax.swing.plaf.multiでのTreePathの使用

    TreePathを返すjavax.swing.plaf.multi内のメソッド 
    修飾子と型 メソッド 説明
    TreePath MultiTreeUI.getClosestPathForLocation​(JTree a, int b, int c)
    このオブジェクトで処理されている各UIでgetClosestPathForLocationメソッドを呼び出します。
    TreePath MultiTreeUI.getEditingPath​(JTree a)
    このオブジェクトで処理されている各UIでgetEditingPathメソッドを呼び出します。
    TreePath MultiTreeUI.getPathForRow​(JTree a, int b)
    このオブジェクトで処理されている各UIでgetPathForRowメソッドを呼び出します。
    TreePath型のパラメータを持つjavax.swing.plaf.multi内のメソッド 
    修飾子と型 メソッド 説明
    Rectangle MultiTreeUI.getPathBounds​(JTree a, TreePath b)
    このオブジェクトで処理されている各UIでgetPathBoundsメソッドを呼び出します。
    int MultiTreeUI.getRowForPath​(JTree a, TreePath b)
    このオブジェクトで処理されている各UIでgetRowForPathメソッドを呼び出します。
    void MultiTreeUI.startEditingAtPath​(JTree a, TreePath b)
    このオブジェクトで処理されている各UIでstartEditingAtPathメソッドを呼び出します。
  • javax.swing.treeでのTreePathの使用

    TreePathとして宣言されているjavax.swing.tree内のフィールド 
    修飾子と型 フィールド 説明
    protected TreePath DefaultTreeCellEditor.lastPath
    選択された最後のパスです。
    protected TreePath DefaultTreeSelectionModel.leadPath
    追加された最後のパスです。
    protected TreePath[] DefaultTreeSelectionModel.selection
    現在選択されているパスです。
    TreePathを返すjavax.swing.tree内のメソッド 
    修飾子と型 メソッド 説明
    TreePath DefaultTreeSelectionModel.getLeadSelectionPath()
    追加された最後のパスを返します。
    TreePath TreeSelectionModel.getLeadSelectionPath()
    追加された最後のパスを返します。
    TreePath TreePath.getParentPath()
    親のTreePathを返します。
    abstract TreePath AbstractLayoutCache.getPathClosestTo​(int x, int y)
    x、yにもっとも近いノードへのパスを返します。
    TreePath FixedHeightLayoutCache.getPathClosestTo​(int x, int y)
    x、yにもっとも近いノードへのパスを返します。
    TreePath VariableHeightLayoutCache.getPathClosestTo​(int x, int y)
    x、yにもっとも近いノードへのパスを返します。
    abstract TreePath AbstractLayoutCache.getPathForRow​(int row)
    渡されたrowのパスを返します。
    TreePath FixedHeightLayoutCache.getPathForRow​(int row)
    渡されたrowのパスを返します。
    TreePath VariableHeightLayoutCache.getPathForRow​(int row)
    rowのパスを返します。
    TreePath DefaultTreeSelectionModel.getSelectionPath()
    選択範囲の先頭のパスを返します。
    TreePath TreeSelectionModel.getSelectionPath()
    選択範囲の先頭のパスを返します。
    TreePath[] DefaultTreeSelectionModel.getSelectionPaths()
    選択範囲を返します。
    TreePath[] TreeSelectionModel.getSelectionPaths()
    選択範囲のパスを返します。
    TreePath TreePath.pathByAddingChild​(Object child)
    このパスのすべての要素に加えてchildの要素を格納する新しいパスを返します。
    TreePath型の引数を持つ型を返すjavax.swing.tree内のメソッド 
    修飾子と型 メソッド 説明
    abstract Enumeration<TreePath> AbstractLayoutCache.getVisiblePathsFrom​(TreePath path)
    渡された位置から開始される可視のパスを次々に列挙するEnumeratorを返します。
    Enumeration<TreePath> FixedHeightLayoutCache.getVisiblePathsFrom​(TreePath path)
    渡された位置から開始される可視のパスを次々に列挙するEnumeratorを返します。
    Enumeration<TreePath> VariableHeightLayoutCache.getVisiblePathsFrom​(TreePath path)
    渡された位置から開始される可視のパスを次々に列挙するEnumeratorを返します。
    TreePath型のパラメータを持つjavax.swing.tree内のメソッド 
    修飾子と型 メソッド 説明
    void DefaultTreeSelectionModel.addSelectionPath​(TreePath path)
    現在の選択範囲にパスを追加します。
    void TreeSelectionModel.addSelectionPath​(TreePath path)
    現在の選択範囲にパスを追加します。
    void DefaultTreeSelectionModel.addSelectionPaths​(TreePath[] paths)
    現在の選択範囲にパスを追加します。
    void TreeSelectionModel.addSelectionPaths​(TreePath[] paths)
    現在の選択範囲にパスを追加します。
    protected boolean DefaultTreeSelectionModel.arePathsContiguous​(TreePath[] paths)
    パスが連続しているか、このオブジェクトにRowMapperがない場合、trueを返します。
    protected boolean DefaultTreeSelectionModel.canPathsBeAdded​(TreePath[] paths)
    TreePathの特定のセットが追加できるかどうか判定するために使用します。
    protected boolean DefaultTreeSelectionModel.canPathsBeRemoved​(TreePath[] paths)
    モデルの連続性を壊さずにパスを削除できる場合にtrueを返します。
    abstract Rectangle AbstractLayoutCache.getBounds​(TreePath path, Rectangle placeIn)
    パスを描画するのに必要な境界を指定する矩形を返します。
    Rectangle FixedHeightLayoutCache.getBounds​(TreePath path, Rectangle placeIn)
    パスを描画するのに必要な境界を指定する矩形を返します。
    Rectangle VariableHeightLayoutCache.getBounds​(TreePath path, Rectangle placeIn)
    pathで識別される項目が描画されるラベル部分を囲むRectangleを返します。
    abstract boolean AbstractLayoutCache.getExpandedState​(TreePath path)
    パスが展開されて可視の場合にtrueを返します。
    boolean FixedHeightLayoutCache.getExpandedState​(TreePath path)
    パスが展開されて可視の場合にtrueを返します。
    boolean VariableHeightLayoutCache.getExpandedState​(TreePath path)
    パスが展開されて可視の場合にtrueを返します。
    abstract int AbstractLayoutCache.getRowForPath​(TreePath path)
    pathで識別される最後の項目が可視である行を返します。
    int FixedHeightLayoutCache.getRowForPath​(TreePath path)
    pathで識別される最後の項目が可視である行を返します。
    int VariableHeightLayoutCache.getRowForPath​(TreePath path)
    pathで識別される最後の項目が可視である行を返します。
    int[] AbstractLayoutCache.getRowsForPaths​(TreePath[] paths)
    path内でTreePathのインスタンスが表示されている行を返します。
    int[] RowMapper.getRowsForPaths​(TreePath[] path)
    path内でTreePathのインスタンスが表示されている行を返します。
    abstract int AbstractLayoutCache.getVisibleChildCount​(TreePath path)
    行について可視の子の数を返します。
    int FixedHeightLayoutCache.getVisibleChildCount​(TreePath path)
    行について可視の子の数を返します。
    int VariableHeightLayoutCache.getVisibleChildCount​(TreePath path)
    pathについて可視の子の数を返します。
    abstract Enumeration<TreePath> AbstractLayoutCache.getVisiblePathsFrom​(TreePath path)
    渡された位置から開始される可視のパスを次々に列挙するEnumeratorを返します。
    Enumeration<TreePath> FixedHeightLayoutCache.getVisiblePathsFrom​(TreePath path)
    渡された位置から開始される可視のパスを次々に列挙するEnumeratorを返します。
    Enumeration<TreePath> VariableHeightLayoutCache.getVisiblePathsFrom​(TreePath path)
    渡された位置から開始される可視のパスを次々に列挙するEnumeratorを返します。
    abstract void AbstractLayoutCache.invalidatePathBounds​(TreePath path)
    pathの矩形は無効で、更新される必要があることをLayoutCacheに通知します。
    void FixedHeightLayoutCache.invalidatePathBounds​(TreePath path)
    処理は行いません。FixedHeightLayoutCacheは幅をキャッシュに格納しません。したがって、変更はありません。
    void VariableHeightLayoutCache.invalidatePathBounds​(TreePath path)
    pathの矩形は無効で、更新される必要があることをLayoutCacheに通知します。
    boolean TreePath.isDescendant​(TreePath aTreePath)
    aTreePathがこのTreePathの下位オブジェクトである場合は、trueを返します。
    abstract boolean AbstractLayoutCache.isExpanded​(TreePath path)
    行で識別される値が現在展開されている場合にtrueを返します。
    boolean FixedHeightLayoutCache.isExpanded​(TreePath path)
    行で識別される値が現在展開されている場合にtrueを返します。
    boolean VariableHeightLayoutCache.isExpanded​(TreePath path)
    pathで識別される値が現在展開されている場合にtrueを返します。
    boolean DefaultTreeSelectionModel.isPathSelected​(TreePath path)
    パスpathが現在の選択範囲にある場合にtrueを返します。
    boolean TreeSelectionModel.isPathSelected​(TreePath path)
    パスpathが現在の選択範囲にある場合にtrueを返します。
    protected void DefaultTreeSelectionModel.notifyPathChange​(Vector<?> changedPaths, TreePath oldLeadSelection)
    非推奨。
    JDK version 1.7以降
    void DefaultTreeSelectionModel.removeSelectionPath​(TreePath path)
    選択範囲からパスを削除します。
    void TreeSelectionModel.removeSelectionPath​(TreePath path)
    選択範囲からパスを削除します。
    void DefaultTreeSelectionModel.removeSelectionPaths​(TreePath[] paths)
    選択範囲からパスを削除します。
    void TreeSelectionModel.removeSelectionPaths​(TreePath[] paths)
    選択範囲からパスを削除します。
    abstract void AbstractLayoutCache.setExpandedState​(TreePath path, boolean isExpanded)
    パスpathの展開状態をisExpandedとしてマーク付けします。
    void FixedHeightLayoutCache.setExpandedState​(TreePath path, boolean isExpanded)
    パスpathの展開状態をisExpandedとしてマーク付けします。
    void VariableHeightLayoutCache.setExpandedState​(TreePath path, boolean isExpanded)
    パスpathの展開状態をisExpandedとしてマーク付けします。
    void DefaultTreeSelectionModel.setSelectionPath​(TreePath path)
    選択範囲をパスに設定します。
    void TreeSelectionModel.setSelectionPath​(TreePath path)
    選択範囲をパスに設定します。
    void DefaultTreeSelectionModel.setSelectionPaths​(TreePath[] pPaths)
    選択範囲を設定します。
    void TreeSelectionModel.setSelectionPaths​(TreePath[] paths)
    選択範囲をパスに設定します。
    void DefaultTreeModel.valueForPathChanged​(TreePath path, Object newValue)
    パスで識別されるTreeNodeのユーザー・オブジェクトを設定し、変更済みのノードを送ります。
    void TreeModel.valueForPathChanged​(TreePath path, Object newValue)
    newValueへのpathによって識別される項目の値をユーザーが変更すると、メッセージとして送信されます。
    TreePath型のパラメータを持つjavax.swing.tree内のコンストラクタ 
    コンストラクタ 説明
    TreePath​(TreePath parent, Object lastPathComponent)
    指定された親および要素でTreePathを作成します。