java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TreeUI
javax.swing.plaf.basic.BasicTreeUI
- 直系の既知のサブクラス:
- MetalTreeUI,- SynthTreeUI
public class BasicTreeUI extends TreeUI
階層データ構造の基本L&Fです。
- 
ネストされたクラスのサマリーネストされたクラス 修飾子と型 クラス 説明 classBasicTreeUI.CellEditorHandlerセル編集イベントを取得し、それに応じてツリーを更新するリスナーです。classBasicTreeUI.ComponentHandlerスクロール時に推奨サイズを更新します(必要に応じて)。classBasicTreeUI.FocusHandlerフォーカスを失ったとき、または取得したときに、リード選択行をペイントし直します。classBasicTreeUI.KeyHandlerこれは、複数のキー押下イベントを取得して適切にイベントを生成するために使用されます。classBasicTreeUI.MouseHandlerTreeMouseListenerはマウス・イベントに基づいて選択を更新します。classBasicTreeUI.MouseInputHandlerMouseInputHandlerは、マウスが放されて構築済みの送信先に送られるまで、すべてのマウス・イベント(マウス・モーション・イベントなど)を渡します。classBasicTreeUI.NodeDimensionsHandlerノードのサイズを取得するクラス、メソッドはBasicTreeUIメソッドに転送されます。classBasicTreeUI.PropertyChangeHandlerツリーのPropertyChangeListenerです。classBasicTreeUI.SelectionModelPropertyChangeHandlerTreeSelectionModelのリスナー、モデルのプロパティが変更された場合に行選択をリセットします。classBasicTreeUI.TreeCancelEditingActionアクションが実行されたときにcancelEditingを呼び出すActionListenerです。classBasicTreeUI.TreeExpansionHandlerノードの展開または折りたたみに応じてTreeStateを更新します。classBasicTreeUI.TreeHomeActionTreeHomeActionは、終了またはホーム・アクションを処理するために使用されます。classBasicTreeUI.TreeIncrementActionTreeIncrementActionは、上下のアクションを処理するために使われます。classBasicTreeUI.TreeModelHandlerすべてのTreeModelイベントをTreeStateに転送します。classBasicTreeUI.TreePageActionTreePageActionは、ページ・アップとページ・ダウンのイベントを処理します。classBasicTreeUI.TreeSelectionHandler選択モデルの変更を待機し、それに応じて表示を更新します。classBasicTreeUI.TreeToggleAction最初に選択された行で、展開状態が切り替えられます。classBasicTreeUI.TreeTraverseActionTreeTraverseActionは、左または右キーのために使用されるアクションです。
- 
フィールドのサマリーフィールド 修飾子と型 フィールド 説明 protected TreeCellEditorcellEditorツリーのエディタです。protected IconcollapsedIcon折りたたまれたアイコン。protected booleancreatedCellEditor現在ツリーにあるエディタがこのインスタンスによって作成された場合にtrueに設定されます。protected booleancreatedRenderer現在ツリーにあるレンダラがこのインスタンスによって作成された場合にtrueに設定されます。protected TreeCellRenderercurrentCellRenderer実際のセルの描画を行うために使われているレンダラです。protected intdepthOffsetx位置を正確に計算するための深さのオフセットの量です。protected Hashtable<TreePath,Boolean>drawingCache垂直線の描画を最小化するために使われます。protected ComponenteditingComponentこれは編集時に、実際の編集を行うComponentになります。protected TreePatheditingPath編集中のパスです。protected inteditingRow編集中の行です。protected booleaneditorHasDifferentSizeエディタのサイズがレンダラと異なる場合にtrueに設定されます。protected IconexpandedIcon展開されたアイコン。protected booleanlargeModellargeModelの最適化を行なっている場合はtrueです。protected intlastSelectedRow最後に選択された行のインデックスです。protected intleftChildIndent左マージンと垂直の破線が描画される位置の間の距離です。protected AbstractLayoutCache.NodeDimensionsnodeDimensionsTreeStateに対しノードに必要なサイズを通知します。protected DimensionpreferredMinSize推奨される最小サイズです。protected DimensionpreferredSizeすべてのノードを完全に表示するために必要なサイズです。protected CellRendererPanerendererPaneTreeCellRendererをペイントするために使われます。protected intrightChildIndentセルの内容が描画される位置を決定するためにleftChildIndentに加算される距離です。protected booleanstopEditingInCompleteEditing編集時に、shouldSelectCell()がtrueを返した場合にfalseに設定されます。これは、completeEditingで使用され、ノードが編集前に選択されなければならないことを意味しています。protected inttotalChildIndentインデントされる総距離です。protected JTreetree描画先のコンポーネントです。protected TreeModeltreeModel何を表示するかを決定するために使われます。protected TreeSelectionModeltreeSelectionModel選択を維持するモデルです。protected AbstractLayoutCachetreeStateサイズ変更や展開されているかどうかを処理するオブジェクトです。protected booleanvalidCachedPreferredSizepreferredSizeが有効かどうかを示します。
- 
コンストラクタのサマリーコンストラクタ コンストラクタ 説明 BasicTreeUI()BasicTreeUIの新しいインスタンスを構築します。
- 
メソッドのサマリー修飾子と型 メソッド 説明 voidcancelEditing(JTree tree)現在の編集セッションを取り消します。protected voidcheckForClickInExpandControl(TreePath path, int mouseX, int mouseY)mouseXおよびmouseYがrowの展開または折りたたみの領域にある場合、このメソッドは行の展開状態を切り替えます。protected voidcompleteEditing()編集中セッションを中止するメッセージを送ります。protected voidcompleteEditing(boolean messageStop, boolean messageCancel, boolean messageTree)編集中セッションを中止します。protected voidcompleteUIInstall()すべてのデフォルトおよびリスナーがインストールされたあとにinstallUIから呼び出されます。protected voidcompleteUIUninstall()UIをアンインストールします。protected voidconfigureLayoutCache()Look & Feelを提供しているツリーに基づいてTreeStateのインスタンスをリセットします。protected CellEditorListenercreateCellEditorListener()現在のエディタからのイベントを処理するリスナーを作成します。protected CellRendererPanecreateCellRendererPane()レンダラ・コンポーネントが配置されているレンダラ・ペインを返します。protected ComponentListenercreateComponentListener()新しいComponentHandlerを作成し、それを返します。protected TreeCellEditorcreateDefaultCellEditor()デフォルトのセル・エディタを作成します。protected TreeCellRenderercreateDefaultCellRenderer()各ノードをスタンプするために使われるデフォルトのセル・レンダラを返します。protected FocusListenercreateFocusListener()フォーカスを喪失または取得したときに表示を更新するリスナーを作成します。protected KeyListenercreateKeyListener()ツリーからキー・イベントを取得するリスナーを作成します。protected AbstractLayoutCachecreateLayoutCache()何が展開されているかおよびノードのサイズを管理するオブジェクトを作成します。protected MouseListenercreateMouseListener()マウス・イベントに基づいて選択を更新するリスナーを作成します。protected AbstractLayoutCache.NodeDimensionscreateNodeDimensions()ツリー内の指定されたノードのサイズを決定できるNodeDimensionsのインスタンスを作成します。protected PropertyChangeListenercreatePropertyChangeListener()ツリーの変更に基づいてUIを更新するリスナーを作成します。protected PropertyChangeListenercreateSelectionModelPropertyChangeListener()選択モデルからプロパティ変更イベントを取得するリスナーを作成します。protected TreeExpansionListenercreateTreeExpansionListener()ノードの展開状態が変更されたときにツリーの状態を更新するオブジェクトを作成し、それを返します。protected TreeModelListenercreateTreeModelListener()モデルが変更されたときにツリーを更新できるリスナーを返します。protected TreeSelectionListenercreateTreeSelectionListener()選択変更メソッドに基づいて表示を更新するリスナーを作成します。static ComponentUIcreateUI(JComponent x)BasicTreeUIの新しいインスタンスを構築します。protected voiddrawCentered(Component c, Graphics graphics, Icon icon, int x, int y)(x,y)を中心とするiconを描画します。protected voiddrawDashedHorizontalLine(Graphics g, int y, int x1, int x2)水平の破線を描画します。protected voiddrawDashedVerticalLine(Graphics g, int x, int y1, int y2)垂直の破線を描画します。protected voidensureRowsAreVisible(int beginRow, int endRow)beginRow〜endRowによって識別される行が確実に表示されるようにします。intgetBaseline(JComponent c, int width, int height)ベースラインを返します。Component.BaselineResizeBehaviorgetBaselineResizeBehavior(JComponent c)サイズの変化に合わせてコンポーネントのベースラインがどのように変化するかを示す列挙を返します。protected TreeCellEditorgetCellEditor()TreeCellEditorのインスタンスを返します。protected TreeCellRenderergetCellRenderer()currentCellRendererを返します。これはツリー・レンダラか、defaultCellRendererです。これはnullではありません。TreePathgetClosestPathForLocation(JTree tree, int x, int y)x、yにもっとも近いノードへのパスを返します。IcongetCollapsedIcon()折りたたまれたアイコンを返します。protected RectanglegetDropLineRect(JTree.DropLocation loc)ドロップ・ラインのアンバウンディング・ボックスを返します。TreePathgetEditingPath(JTree tree)編集中の要素へのパスを返します。IcongetExpandedIcon()展開されたアイコンを返します。protected ColorgetHashColor()ハッシュの色を返します。protected intgetHorizontalLegBuffer()ノード間の脚の水平要素は、デフォルトでは子ノードの左側の右で始まります。protected TreePathgetLastChildPath(TreePath parent)parentの最後の子のパスを返します。protected intgetLeadSelectionRow()選択のリード行を返します。intgetLeftChildIndent()左の子インデントを返します。DimensiongetMaximumSize(JComponent c)このコンポーネントの最大サイズを返します。インスタンスが現在JTreeにある場合は推奨サイズ、そうでない場合は0, 0です。DimensiongetMinimumSize(JComponent c)このコンポーネントの最小サイズを返します。protected TreeModelgetModel()ツリー・モデルを返します。RectanglegetPathBounds(JTree tree, TreePath path)パスの最後の項目が描画されるラベル部分を囲むRectangleを返します。TreePathgetPathForRow(JTree tree, int row)渡されたrowのパスを返します。DimensiongetPreferredMinSize()推奨される最小サイズを返します。DimensiongetPreferredSize(JComponent c)ツリーを適切に表示するための優先サイズを返します。これはgetPreferredSize(c, true)のカバー・メソッドです。DimensiongetPreferredSize(JComponent c, boolean checkConsistency)cでツリーを表すための推奨サイズを返します。intgetRightChildIndent()右の子インデントを返します。intgetRowCount(JTree tree)表示されている行数を返します。intgetRowForPath(JTree tree, TreePath path)pathで識別される最後の項目が可視である行を返します。protected intgetRowHeight()行の高さを返します。protected intgetRowX(int row, int depth)x軸に沿って特定の行をレンダリングする位置を返します。protected TreeSelectionModelgetSelectionModel()ツリー選択モデルを返します。protected booleangetShowsRootHandles()ルート・ハンドルが表示される場合はtrueを返します。protected intgetVerticalLegBuffer()ノード間の脚の垂直要素は、デフォルトでは親ノードの下端から始まります。protected voidhandleExpandControlClick(TreePath path, int mouseX, int mouseY)ユーザーが特定の行をクリックするとメッセージが送られ、toggleExpandStateが呼び出されます。protected voidinstallComponents()レンダラ・ペインである、ツリーのサブコンポーネントをインストールします。protected voidinstallDefaults()デフォルトのプロパティをインストールします。protected voidinstallKeyboardActions()キーボード・アクションを登録します。protected voidinstallListeners()リスナーを登録します。protected booleanisDropLine(JTree.DropLocation loc)DropLocationをノード間のラインによって示すかどうかを通知します。protected booleanisEditable()ツリーが編集可能な場合はtrueを返します。booleanisEditing(JTree tree)ツリーが編集中の場合にtrueを返します。protected booleanisLargeModel()大きなモデルが設定されている場合、trueを返します。protected booleanisLeaf(int row)rowのノードがリーフの場合、trueを返します。protected booleanisLocationInExpandControl(TreePath path, int mouseX, int mouseY)mouseXとmouseYが、ノードを展開/折りたたむために使用される行の領域に入る場合はtrueを返し、rowのノードはリーフを表しません。protected booleanisMultiSelectEvent(MouseEvent event)trueを返すと、ノード上のマウス・イベントがアンカー・ポイントから選択されることを意味します。protected booleanisRootVisible()ツリー・ルートが表示されている場合はtrueを返します。protected booleanisToggleEvent(MouseEvent event)trueを返すと、マウスの下の行がイベントに基づいてトグルされるべきであることが示されます。protected booleanisToggleSelectionEvent(MouseEvent event)trueを返すと、ノード上のマウス・イベントは、マウスの下の行のみの選択を切り替える必要があることを示します。protected voidpaintDropLine(Graphics g)ドロップ・ラインをペイントします。protected voidpaintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)行の展開(切り替え)部分をペイントします。protected voidpaintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)水平線をペイントします。protected voidpaintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)脚の水平部分をペイントします。protected voidpaintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)行のレンダラ部分をペイントします。protected voidpaintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)垂直線をペイントします。protected voidpaintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)脚の垂直部分をペイントします。protected voidpathWasCollapsed(TreePath path)VisibleTreeNodeから折りたたまれた後にメッセージが送られます。protected voidpathWasExpanded(TreePath path)VisibleTreeNodeから展開された後にメッセージが送られます。protected voidprepareForUIInstall()treeインスタンス変数の設定後、デフォルトおよびリスナーがインストールされる前に呼び出されます。protected voidprepareForUIUninstall()UIをアンストールする前に呼び出されます。protected voidselectPathForEvent(TreePath path, MouseEvent event)特定の行のMouseEventに基づいて選択を更新するようにメッセージを送りました。protected voidsetCellEditor(TreeCellEditor editor)セル・エディタを設定します。protected voidsetCellRenderer(TreeCellRenderer tcr)TreeCellRendererをtcrに設定します。voidsetCollapsedIcon(Icon newG)折りたたまれたアイコンを設定します。protected voidsetEditable(boolean newValue)レシーバが編集を許可するかどうかを設定します。voidsetExpandedIcon(Icon newG)展開されたアイコンを設定します。protected voidsetHashColor(Color color)ハッシュ・カラーを設定します。protected voidsetLargeModel(boolean largeModel)必要な場合に、componentListenerを更新します。voidsetLeftChildIndent(int newAmount)左の子インデントを設定します。protected voidsetModel(TreeModel model)TreeModelを設定します。voidsetPreferredMinSize(Dimension newSize)推奨される最小サイズを設定します。voidsetRightChildIndent(int newAmount)右の子インデントを設定します。protected voidsetRootVisible(boolean newValue)ルートを可視に設定します。protected voidsetRowHeight(int rowHeight)treeStateに転送される、行の高さを設定します。protected voidsetSelectionModel(TreeSelectionModel newLSM)選択モデルをリセットします。protected voidsetShowsRootHandles(boolean newValue)ノードのハンドルが表示されるかどうかを決めます。protected booleanshouldPaintExpandControl(TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)(toggle)コントロールを展開して指定された行に描画する必要がある場合は、trueを返します。protected booleanstartEditing(TreePath path, MouseEvent event)cellEditorがあり、shouldSelectCellがtrueを返した場合、ノードの編集を開始します。voidstartEditingAtPath(JTree tree, TreePath path)pathの最後の項目を選択し、その項目の編集を試みます。booleanstopEditing(JTree tree)現在の編集セッションを中止します。protected voidtoggleExpandState(TreePath path)パスが展開されてない場合は展開し、行が展開されている場合は折りたたみます。protected voiduninstallComponents()レンダラ・ペインをアンインストールします。protected voiduninstallDefaults()デフォルト・プロパティをアンインストールします。protected voiduninstallKeyboardActions()キーボード・アクションを登録解除します。protected voiduninstallListeners()リスナーの登録を解除します。protected voidupdateCachedPreferredSize()getPreferredSize()から返されるpreferredSizeインスタンス変数を更新します。protected voidupdateCellEditor()現在含まれているJTreeが編集できるかどうかに応じてcellEditorを更新します。protected voidupdateDepthOffset()各深さをどのくらいオフセットするべきかを更新します。protected voidupdateExpandedDescendants(TreePath path)ツリーから展開されている子孫を取得し、ツリー状態に転送することで、pathのすべての子孫の展開状態を更新します。protected voidupdateLayoutCacheExpandedNodes()JTreeで展開されているすべてのノードをLayoutCacheで展開します。protected voidupdateLeadSelectionRow()選択のリード行を更新します。protected voidupdateRenderer()レンダラが変更されたときにツリーからメッセージとして送られます。protected voidupdateSize()キャッシュされているサイズを無効とマークし、treeDidChangeでメッセージをツリーに送ります。クラス javax.swing.plaf.ComponentUIで宣言されたメソッドcontains, getAccessibleChild, getAccessibleChildrenCount, installUI, paint, uninstallUI, update
- 
フィールド詳細- 
collapsedIconprotected transient Icon collapsedIcon折りたたまれたアイコン。
- 
expandedIconprotected transient Icon expandedIcon展開されたアイコン。
- 
leftChildIndentprotected int leftChildIndent左マージンと垂直の破線が描画される位置の間の距離です。
- 
rightChildIndentprotected int rightChildIndentセルの内容が描画される位置を決定するためにleftChildIndentに加算される距離です。
- 
totalChildIndentprotected int totalChildIndentインデントされる総距離です。 leftChildIndentとrightChildIndentの合計です。
- 
preferredMinSizeprotected Dimension preferredMinSize推奨される最小サイズです。
- 
lastSelectedRowprotected int lastSelectedRow最後に選択された行のインデックスです。
- 
treeprotected JTree tree描画先のコンポーネントです。
- 
currentCellRendererprotected transient TreeCellRenderer currentCellRenderer実際のセルの描画を行うために使われているレンダラです。
- 
createdRendererprotected boolean createdRenderer現在ツリーにあるレンダラがこのインスタンスによって作成された場合にtrueに設定されます。
- 
cellEditorprotected transient TreeCellEditor cellEditorツリーのエディタです。
- 
createdCellEditorprotected boolean createdCellEditor現在ツリーにあるエディタがこのインスタンスによって作成された場合にtrueに設定されます。
- 
stopEditingInCompleteEditingprotected boolean stopEditingInCompleteEditing編集時に、shouldSelectCell()がtrueを返した場合にfalseに設定されます。これは、completeEditingで使用され、ノードが編集前に選択されなければならないことを意味しています。
- 
rendererPaneprotected CellRendererPane rendererPaneTreeCellRendererをペイントするために使われます。
- 
preferredSizeprotected Dimension preferredSizeすべてのノードを完全に表示するために必要なサイズです。
- 
validCachedPreferredSizeprotected boolean validCachedPreferredSizepreferredSizeが有効かどうかを示します。
- 
treeStateprotected AbstractLayoutCache treeStateサイズ変更や展開されているかどうかを処理するオブジェクトです。
- 
drawingCache垂直線の描画を最小化するために使われます。
- 
largeModelprotected boolean largeModellargeModelの最適化を行なっている場合はtrueです。 これをサポートしないサブクラスは、FixedHeightLayoutCacheのインスタンスを返さないようにcreateLayoutCacheをオーバーライドすることをお勧めします。
- 
nodeDimensionsprotected AbstractLayoutCache.NodeDimensions nodeDimensionsTreeStateに対しノードに必要なサイズを通知します。
- 
treeModelprotected TreeModel treeModel何を表示するかを決定するために使われます。
- 
treeSelectionModelprotected TreeSelectionModel treeSelectionModel選択を維持するモデルです。
- 
depthOffsetprotected int depthOffsetx位置を正確に計算するための深さのオフセットの量です。 これは、ルートが可視かどうか、ルート・ハンドルが可視どうかによって決まります。
- 
editingComponentprotected Component editingComponentこれは編集時に、実際の編集を行うComponentになります。
- 
editingPathprotected TreePath editingPath編集中のパスです。
- 
editingRowprotected int editingRow編集中の行です。 editingComponentがnullではない場合だけ参照されます。
- 
editorHasDifferentSizeprotected boolean editorHasDifferentSizeエディタのサイズがレンダラと異なる場合にtrueに設定されます。
 
- 
- 
コンストラクタの詳細- 
BasicTreeUIpublic BasicTreeUI()BasicTreeUIの新しいインスタンスを構築します。
 
- 
- 
メソッドの詳細- 
createUIpublic static ComponentUI createUI(JComponent x)BasicTreeUIの新しいインスタンスを構築します。- パラメータ:
- x- コンポーネント
- 戻り値:
- BasicTreeUIの新しいインスタンス
 
- 
getHashColorprotected Color getHashColor()ハッシュの色を返します。- 戻り値:
- ハッシュ・カラー
 
- 
setHashColorprotected void setHashColor(Color color)ハッシュ・カラーを設定します。- パラメータ:
- color- ハッシュ・カラー
 
- 
setLeftChildIndentpublic void setLeftChildIndent(int newAmount)左の子インデントを設定します。- パラメータ:
- newAmount- 左の子インデント
 
- 
getLeftChildIndentpublic int getLeftChildIndent()左の子インデントを返します。- 戻り値:
- 左の子インデント
 
- 
setRightChildIndentpublic void setRightChildIndent(int newAmount)右の子インデントを設定します。- パラメータ:
- newAmount- 右の子インデント
 
- 
getRightChildIndentpublic int getRightChildIndent()右の子インデントを返します。- 戻り値:
- 右の子インデント
 
- 
setExpandedIconpublic void setExpandedIcon(Icon newG)展開されたアイコンを設定します。- パラメータ:
- newG- 展開されたアイコン
 
- 
getExpandedIconpublic Icon getExpandedIcon()展開されたアイコンを返します。- 戻り値:
- 展開されたアイコン
 
- 
setCollapsedIconpublic void setCollapsedIcon(Icon newG)折りたたまれたアイコンを設定します。- パラメータ:
- newG- 折りたたまれたアイコン
 
- 
getCollapsedIconpublic Icon getCollapsedIcon()折りたたまれたアイコンを返します。- 戻り値:
- 折りたたまれたアイコン
 
- 
setLargeModelprotected void setLargeModel(boolean largeModel)必要な場合に、componentListenerを更新します。- パラメータ:
- largeModel- 新しい価値
 
- 
isLargeModelprotected boolean isLargeModel()大きなモデルが設定されている場合、trueを返します。- 戻り値:
- 大型モデルが設定されている場合はtrue
 
- 
setRowHeightprotected void setRowHeight(int rowHeight)treeStateに転送される、行の高さを設定します。- パラメータ:
- rowHeight- 行の高さ
 
- 
getRowHeightprotected int getRowHeight()行の高さを返します。- 戻り値:
- 行の高さ
 
- 
setCellRendererprotected void setCellRenderer(TreeCellRenderer tcr)TreeCellRendererをtcrに設定します。 これにより、updateRendererが呼び出されます。- パラメータ:
- tcr- 新しい価値
 
- 
getCellRendererprotected TreeCellRenderer getCellRenderer()currentCellRendererを返します。これはツリー・レンダラか、defaultCellRendererです。これはnullではありません。- 戻り値:
- TreeCellRendererのインスタンス
 
- 
setModelprotected void setModel(TreeModel model)TreeModelを設定します。- パラメータ:
- model- 新しい価値
 
- 
getModelprotected TreeModel getModel()ツリー・モデルを返します。- 戻り値:
- ツリー・モデル
 
- 
setRootVisibleprotected void setRootVisible(boolean newValue)ルートを可視に設定します。- パラメータ:
- newValue- 新しい値
 
- 
isRootVisibleprotected boolean isRootVisible()ツリー・ルートが表示されている場合はtrueを返します。- 戻り値:
- true、ツリー・ルートが表示されている場合
 
- 
setShowsRootHandlesprotected void setShowsRootHandles(boolean newValue)ノードのハンドルが表示されるかどうかを決めます。- パラメータ:
- newValue- 新しい値
 
- 
getShowsRootHandlesprotected boolean getShowsRootHandles()ルート・ハンドルが表示される場合はtrueを返します。- 戻り値:
- ルート・ハンドルが表示される場合はtrue
 
- 
setCellEditorprotected void setCellEditor(TreeCellEditor editor)セル・エディタを設定します。- パラメータ:
- editor- 新しいセル・エディタ
 
- 
getCellEditorprotected TreeCellEditor getCellEditor()TreeCellEditorのインスタンスを返します。- 戻り値:
- TreeCellEditorのインスタンス
 
- 
setEditableprotected void setEditable(boolean newValue)レシーバが編集を許可するかどうかを設定します。- パラメータ:
- newValue- 新しい値
 
- 
isEditableprotected boolean isEditable()ツリーが編集可能な場合はtrueを返します。- 戻り値:
- ツリーが編集可能な場合はtrue
 
- 
setSelectionModelprotected void setSelectionModel(TreeSelectionModel newLSM)選択モデルをリセットします。 適切なリスナーがモデルでインストールされます。- パラメータ:
- newLSM- 新しい選択モデル
 
- 
getSelectionModelprotected TreeSelectionModel getSelectionModel()ツリー選択モデルを返します。- 戻り値:
- ツリー選択モデル
 
- 
getPathBoundsパスの最後の項目が描画されるラベル部分を囲むRectangleを返します。 パスのコンポーネントのどれかが現在有効な場合は、nullが返されます。- 定義:
- getPathBounds、クラス:- TreeUI
- パラメータ:
- tree-- pathの- JTree
- path- ノードを識別する- TreePath
- 戻り値:
- パスの最後のアイテムが描画されるラベル部分を囲むRectangle、パス内のコンポーネントが現在有効な場合はnull。
 
- 
getPathForRow渡されたrowのパスを返します。 rowが可視でない場合は、nullが返されます。- 定義:
- getPathForRow、クラス:- TreeUI
- パラメータ:
- tree-- JTreeオブジェクト
- row- 行を指定する整数
- 戻り値:
- rowが表示されない場合は- rowまたは- nullの- path
 
- 
getRowForPathpathで識別される最後の項目が可視である行を返します。 path内のどの要素も現在は可視でない場合は、-1を返します。- 定義:
- getRowForPath、クラス:- TreeUI
- パラメータ:
- tree-- pathの- JTree
- path- 見る- TreePathオブジェクト
- 戻り値:
- pathの要素のどれかが現在可視でない場合は -1を返します。
 
- 
getRowCountpublic int getRowCount(JTree tree)表示されている行数を返します。- 定義:
- getRowCount、クラス:- TreeUI
- パラメータ:
- tree- 行数をカウントする- JTree
- 戻り値:
- 表示されている行の数を指定する整数
 
- 
getClosestPathForLocationx、yにもっとも近いノードへのパスを返します。 現在可視のものがない場合は、nullを返します。そうでない場合は、常に有効なパスを返します。 返されたオブジェクトが正確にx, yにあるかどうかを判定する必要がある場合は、返されたパスの矩形を取得して、x, yと比較するようにしてください。- 定義:
- getClosestPathForLocation、クラス:- TreeUI
- パラメータ:
- tree-- JTreeオブジェクト
- x- 表示領域の左端から水平方向にピクセル数を与える整数。
- y- 表示領域の上端からの垂直距離をピクセル単位で示す整数値(上マージンは除く)
- 戻り値:
- 現在表示されているものがない場合は、x,yまたはnullに最も近いTreePathノード
 
- 
isEditingpublic boolean isEditing(JTree tree)ツリーが編集中の場合にtrueを返します。 編集中の項目を取得するには、getEditingPath()を使います。
- 
stopEditingpublic boolean stopEditing(JTree tree)現在の編集セッションを中止します。 ツリーが編集中でない場合は、このメソッドは何も行いません。 エディタが編集セッションの中止を許可した場合は、trueを返します。- 定義:
- stopEditing、クラス:- TreeUI
- パラメータ:
- tree-- JTreeオブジェクト
- 戻り値:
- エディタが編集セッションを停止できる場合はtrue
 
- 
cancelEditingpublic void cancelEditing(JTree tree)現在の編集セッションを取り消します。- 定義:
- cancelEditing、クラス:- TreeUI
- パラメータ:
- tree-- JTreeオブジェクト
 
- 
startEditingAtPathpathの最後の項目を選択し、その項目の編集を試みます。 CellEditorが選択された項目の編集を許可しない場合、編集は失敗します。- 定義:
- startEditingAtPath、クラス:- TreeUI
- パラメータ:
- tree- 編集中の- JTree
- path- 編集する- TreePath
 
- 
getEditingPath編集中の要素へのパスを返します。- 定義:
- getEditingPath、クラス:- TreeUI
- パラメータ:
- tree- パスを返す- JTree
- 戻り値:
- treeへのパスを含む- TreePath
 
- 
prepareForUIInstallprotected void prepareForUIInstall()treeインスタンス変数の設定後、デフォルトおよびリスナーがインストールされる前に呼び出されます。
- 
completeUIInstallprotected void completeUIInstall()すべてのデフォルトおよびリスナーがインストールされたあとにinstallUIから呼び出されます。
- 
installDefaultsprotected void installDefaults()デフォルトのプロパティをインストールします。
- 
installListenersprotected void installListeners()リスナーを登録します。
- 
installKeyboardActionsprotected void installKeyboardActions()キーボード・アクションを登録します。
- 
installComponentsprotected void installComponents()レンダラ・ペインである、ツリーのサブコンポーネントをインストールします。
- 
createNodeDimensionsprotected AbstractLayoutCache.NodeDimensions createNodeDimensions()ツリー内の指定されたノードのサイズを決定できるNodeDimensionsのインスタンスを作成します。- 戻り値:
- NodeDimensionsのインスタンス
 
- 
createPropertyChangeListenerprotected PropertyChangeListener createPropertyChangeListener()ツリーの変更に基づいてUIを更新するリスナーを作成します。- 戻り値:
- PropertyChangeListenerのインスタンス
 
- 
createMouseListenerprotected MouseListener createMouseListener()マウス・イベントに基づいて選択を更新するリスナーを作成します。- 戻り値:
- MouseListenerのインスタンス
 
- 
createFocusListenerprotected FocusListener createFocusListener()フォーカスを喪失または取得したときに表示を更新するリスナーを作成します。- 戻り値:
- FocusListenerのインスタンス
 
- 
createKeyListenerprotected KeyListener createKeyListener()ツリーからキー・イベントを取得するリスナーを作成します。- 戻り値:
- KeyListenerのインスタンス
 
- 
createSelectionModelPropertyChangeListenerprotected PropertyChangeListener createSelectionModelPropertyChangeListener()選択モデルからプロパティ変更イベントを取得するリスナーを作成します。- 戻り値:
- PropertyChangeListenerのインスタンス
 
- 
createTreeSelectionListenerprotected TreeSelectionListener createTreeSelectionListener()選択変更メソッドに基づいて表示を更新するリスナーを作成します。- 戻り値:
- TreeSelectionListenerのインスタンス
 
- 
createCellEditorListenerprotected CellEditorListener createCellEditorListener()現在のエディタからのイベントを処理するリスナーを作成します。- 戻り値:
- CellEditorListenerのインスタンス
 
- 
createComponentListenerprotected ComponentListener createComponentListener()新しいComponentHandlerを作成し、それを返します。 これは、大きなモデルで、コンポーネントが移動したときにvalidCachedPreferredSizeを無効にするために使用されます。- 戻り値:
- ComponentListenerのインスタンス
 
- 
createTreeExpansionListenerprotected TreeExpansionListener createTreeExpansionListener()ノードの展開状態が変更されたときにツリーの状態を更新するオブジェクトを作成し、それを返します。- 戻り値:
- TreeExpansionListenerのインスタンス
 
- 
createLayoutCacheprotected AbstractLayoutCache createLayoutCache()何が展開されているかおよびノードのサイズを管理するオブジェクトを作成します。- 戻り値:
- 拡張されたものを管理するオブジェクト
 
- 
createCellRendererPaneprotected CellRendererPane createCellRendererPane()レンダラ・コンポーネントが配置されているレンダラ・ペインを返します。- 戻り値:
- CellRendererPaneのインスタンス
 
- 
createDefaultCellEditorprotected TreeCellEditor createDefaultCellEditor()デフォルトのセル・エディタを作成します。- 戻り値:
- デフォルトのセル・エディタ
 
- 
createDefaultCellRendererprotected TreeCellRenderer createDefaultCellRenderer()各ノードをスタンプするために使われるデフォルトのセル・レンダラを返します。- 戻り値:
- TreeCellRendererのインスタンス
 
- 
createTreeModelListenerprotected TreeModelListener createTreeModelListener()モデルが変更されたときにツリーを更新できるリスナーを返します。- 戻り値:
- TreeModelListenerのインスタンス。
 
- 
prepareForUIUninstallprotected void prepareForUIUninstall()UIをアンストールする前に呼び出されます。
- 
completeUIUninstallprotected void completeUIUninstall()UIをアンインストールします。
- 
uninstallDefaultsprotected void uninstallDefaults()デフォルト・プロパティをアンインストールします。
- 
uninstallListenersprotected void uninstallListeners()リスナーの登録を解除します。
- 
uninstallKeyboardActionsprotected void uninstallKeyboardActions()キーボード・アクションを登録解除します。
- 
uninstallComponentsprotected void uninstallComponents()レンダラ・ペインをアンインストールします。
- 
getBaselinepublic int getBaseline(JComponent c, int width, int height)ベースラインを返します。- オーバーライド:
- getBaseline、クラス:- ComponentUI
- パラメータ:
- c- ベースラインが要求される- JComponent
- width- ベースラインを取得する幅
- height- ベースラインを取得する高さ
- 戻り値:
- ベースラインまたは0より小さい値(適切なベースラインがないことを示す)
- 例外:
- NullPointerException-- cが- nullである場合
- IllegalArgumentException- 幅または高さが0より小さい場合
- 導入されたバージョン:
- 1.6
- 関連項目:
- JComponent.getBaseline(int, int)
 
- 
getBaselineResizeBehaviorpublic Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)サイズの変化に合わせてコンポーネントのベースラインがどのように変化するかを示す列挙を返します。- オーバーライド:
- getBaselineResizeBehavior、クラス:- ComponentUI
- パラメータ:
- c- ベースラインのサイズ変更の動作を返す- JComponent
- 戻り値:
- コンポーネント・サイズの変化に合わせてベースラインがどのように変化するかを示す列挙
- 例外:
- NullPointerException-- cが- nullである場合
- 導入されたバージョン:
- 1.6
- 関連項目:
- JComponent.getBaseline(int, int)
 
- 
isDropLineprotected boolean isDropLine(JTree.DropLocation loc)DropLocationをノード間のラインによって示すかどうかを通知します。 これはjavax.swing.DropMode.INSERTおよびjavax.swing.DropMode.ON_OR_INSERTドロップ・モードで使用されます。- パラメータ:
- loc-- DropLocation
- 戻り値:
- ドロップ位置をラインとして示す場合はtrue
- 導入されたバージョン:
- 1.7
 
- 
paintDropLineprotected void paintDropLine(Graphics g)ドロップ・ラインをペイントします。- パラメータ:
- g- 描画する- Graphicsオブジェクト
- 導入されたバージョン:
- 1.7
 
- 
getDropLineRectprotected Rectangle getDropLineRect(JTree.DropLocation loc)ドロップ・ラインのアンバウンディング・ボックスを返します。- パラメータ:
- loc-- DropLocation
- 戻り値:
- ドロップ・ラインのバウンディング・ボックス
- 導入されたバージョン:
- 1.7
 
- 
paintHorizontalPartOfLegprotected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)脚の水平部分をペイントします。 レシーバは、clipBoundsやinsetsを変更しないようにしてください。ノート: ルートが可視でない場合、 parentRowは -1になることがあります。- パラメータ:
- g- グラフィックス・コンテキスト
- clipBounds- クリップされた矩形
- insets- insets
- bounds- 外接する矩形
- path- ツリー・パス
- row- 行
- isExpanded- パスが展開されている場合は- true
- hasBeenExpanded- パスが展開されている場合は- true
- isLeaf- パスがリーフの場合は- true
 
- 
paintVerticalPartOfLegprotected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)脚の垂直部分をペイントします。 レシーバは、clipBoundsやinsetsを変更しないようにしてください。- パラメータ:
- g- グラフィックス・コンテキスト
- clipBounds- クリップされた矩形
- insets- insets
- path- ツリー・パス
 
- 
paintExpandControlprotected void paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)行の展開(切り替え)部分をペイントします。 レシーバは、clipBoundsやinsetsを変更しないようにしてください。- パラメータ:
- g- グラフィックス・コンテキスト
- clipBounds- クリップされた矩形
- insets- insets
- bounds- 外接する矩形
- path- ツリー・パス
- row- 行
- isExpanded- パスが展開されている場合は- true
- hasBeenExpanded- パスが展開されている場合は- true
- isLeaf- 行がリーフの場合は- true
 
- 
paintRowprotected void paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)行のレンダラ部分をペイントします。 レシーバは、clipBoundsやinsetsを変更しないようにしてください。- パラメータ:
- g- グラフィックス・コンテキスト
- clipBounds- クリップされた矩形
- insets- insets
- bounds- 外接する矩形
- path- ツリー・パス
- row- 行
- isExpanded- パスが展開されている場合は- true
- hasBeenExpanded- パスが展開されている場合は- true
- isLeaf- パスがリーフの場合は- true
 
- 
shouldPaintExpandControlprotected boolean shouldPaintExpandControl(TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)(toggle)コントロールを展開して指定された行に描画する必要がある場合は、trueを返します。- パラメータ:
- path- ツリー・パス
- row- 行
- isExpanded- パスが展開されている場合は- true
- hasBeenExpanded- パスが展開されている場合は- true
- isLeaf- 行がリーフの場合は- true
- 戻り値:
- 指定された行の(toggle)コントロールを展開する必要がある場合はtrue
 
- 
paintVerticalLineprotected void paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)垂直線をペイントします。- パラメータ:
- g- グラフィックス・コンテキスト
- c- コンポーネント
- x- X座標
- top- Y1座標
- bottom- Y2座標
 
- 
paintHorizontalLineprotected void paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)水平線をペイントします。- パラメータ:
- g- グラフィックス・コンテキスト
- c- コンポーネント
- y- Y座標
- left- X1座標
- right- X2座標
 
- 
getVerticalLegBufferprotected int getVerticalLegBuffer()ノード間の脚の垂直要素は、デフォルトでは親ノードの下端から始まります。 このメソッドは、脚がそれより下で始まるようにします。- 戻り値:
- 垂直バッファ
 
- 
getHorizontalLegBufferprotected int getHorizontalLegBuffer()ノード間の脚の水平要素は、デフォルトでは子ノードの左側の右で始まります。 このメソッドは、脚がそれより前で終わるようにします。- 戻り値:
- 水平バッファ
 
- 
drawCentered(x,y)を中心とするiconを描画します。- パラメータ:
- c- コンポーネント
- graphics- グラフィックス・コンテキスト
- icon- アイコン
- x- X座標
- y- Y座標
 
- 
drawDashedHorizontalLineprotected void drawDashedHorizontalLine(Graphics g, int y, int x1, int x2)水平の破線を描画します。x1<=x2とします。x1がx2より大きい場合、このメソッドは何も描画しません。- パラメータ:
- g-- Graphicsのインスタンス
- y- Y座標
- x1- X1座標
- x2- X2座標
 
- 
drawDashedVerticalLineprotected void drawDashedVerticalLine(Graphics g, int x, int y1, int y2)垂直の破線を描画します。y1<=y2とします。y1がy2より大きい場合、このメソッドは何も描画しません。- パラメータ:
- g-- Graphicsのインスタンス
- x- X座標
- y1- Y1座標
- y2- Y2座標
 
- 
getRowXprotected int getRowX(int row, int depth)x軸に沿って特定の行をレンダリングする位置を返します。 戻り値には、JTreeで指定されたイン・セット値は一切含まれません。 このメソッドでは、行または深さの有効性は確認しないため、行または深さがツリーのそれと一致しない場合でも、正しいと見なされて、例外をスローしません。- パラメータ:
- row- x位置を返す行
- depth- 行の深さ
- 戻り値:
- 指定された行をインデントする量。
- 導入されたバージョン:
- 1.5
 
- 
updateLayoutCacheExpandedNodesprotected void updateLayoutCacheExpandedNodes()JTreeで展開されているすべてのノードをLayoutCacheで展開します。 これにより、ルート・パスでupdateExpandedDescendantsが呼び出されます。
- 
updateExpandedDescendantsprotected void updateExpandedDescendants(TreePath path)ツリーから展開されている子孫を取得し、ツリー状態に転送することで、pathのすべての子孫の展開状態を更新します。- パラメータ:
- path- ツリー・パス
 
- 
getLastChildPathparentの最後の子のパスを返します。- パラメータ:
- parent- ツリー・パス
- 戻り値:
- parentの最後の子へのパス
 
- 
updateDepthOffsetprotected void updateDepthOffset()各深さをどのくらいオフセットするべきかを更新します。
- 
updateCellEditorprotected void updateCellEditor()現在含まれているJTreeが編集できるかどうかに応じてcellEditorを更新します。 ツリーが編集できるが、cellEditorがない場合、基本的なセル・エディタが使われます。
- 
updateRendererprotected void updateRenderer()レンダラが変更されたときにツリーからメッセージとして送られます。
- 
configureLayoutCacheprotected void configureLayoutCache()Look & Feelを提供しているツリーに基づいてTreeStateのインスタンスをリセットします。
- 
updateSizeprotected void updateSize()キャッシュされているサイズを無効とマークし、treeDidChangeでメッセージをツリーに送ります。
- 
updateCachedPreferredSizeprotected void updateCachedPreferredSize()getPreferredSize()から返されるpreferredSizeインスタンス変数を更新します。左から右方向の場合、サイズは現在のAbstractLayoutCacheから決定されます。 右から左方向の場合、推奨サイズは幅から最小のx位置を引いた値になります。 
- 
pathWasExpandedprotected void pathWasExpanded(TreePath path)VisibleTreeNodeから展開された後にメッセージが送られます。- パラメータ:
- path- ツリー・パス
 
- 
pathWasCollapsedprotected void pathWasCollapsed(TreePath path)VisibleTreeNodeから折りたたまれた後にメッセージが送られます。- パラメータ:
- path- ツリー・パス
 
- 
ensureRowsAreVisibleprotected void ensureRowsAreVisible(int beginRow, int endRow)beginRow〜endRowによって識別される行が確実に表示されるようにします。- パラメータ:
- beginRow- 開始行
- endRow- 最後の行
 
- 
setPreferredMinSizepublic void setPreferredMinSize(Dimension newSize)推奨される最小サイズを設定します。- パラメータ:
- newSize- 新しい優先サイズ
 
- 
getPreferredMinSizepublic Dimension getPreferredMinSize()推奨される最小サイズを返します。- 戻り値:
- 最小優先サイズ
 
- 
getPreferredSizepublic Dimension getPreferredSize(JComponent c)ツリーを適切に表示するための優先サイズを返します。これはgetPreferredSize(c, true)のカバー・メソッドです。- オーバーライド:
- getPreferredSize、クラス:- ComponentUI
- パラメータ:
- c- コンポーネント
- 戻り値:
- コンポーネント内のツリーを表すのに優先されるサイズ
- 関連項目:
- JComponent.getPreferredSize(),- LayoutManager.preferredLayoutSize(java.awt.Container)
 
- 
getPreferredSizepublic Dimension getPreferredSize(JComponent c, boolean checkConsistency)cでツリーを表すための推奨サイズを返します。 checkConsistencyがtrueの場合、checkConsistencyが最初に送信されます。- パラメータ:
- c- コンポーネント
- checkConsistency-- trueの整合性がチェックされている場合
- 戻り値:
- コンポーネント内のツリーを表すのに優先されるサイズ
 
- 
getMinimumSizepublic Dimension getMinimumSize(JComponent c)このコンポーネントの最小サイズを返します。 推奨される最小サイズまたは0, 0になります。- オーバーライド:
- getMinimumSize、クラス:- ComponentUI
- パラメータ:
- c- 最小サイズが照会されるコンポーネント。この引数は通常無視されるが、UIオブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがある
- 戻り値:
- Dimensionオブジェクトまたは- null
- 関連項目:
- JComponent.getMinimumSize(),- LayoutManager.minimumLayoutSize(java.awt.Container),- ComponentUI.getPreferredSize(javax.swing.JComponent)
 
- 
getMaximumSizepublic Dimension getMaximumSize(JComponent c)このコンポーネントの最大サイズを返します。インスタンスが現在JTreeにある場合は推奨サイズ、そうでない場合は0, 0です。- オーバーライド:
- getMaximumSize、クラス:- ComponentUI
- パラメータ:
- c- 最大サイズが照会されるコンポーネント。この引数は通常無視されるが、UIオブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがある
- 戻り値:
- Dimensionオブジェクトまたは- null
- 関連項目:
- JComponent.getMaximumSize(),- LayoutManager2.maximumLayoutSize(java.awt.Container)
 
- 
completeEditingprotected void completeEditing()編集中セッションを中止するメッセージを送ります。 レシーバがLook & Feelを提供しているUIがgetInvokesStopCellEditingからtrueを返す場合、stopCellEditingが現在のエディタで呼び出されます。 次にcompleteEditingがfalseまたはtrueでメッセージとして送られます。falseは、中途の編集を取り消します。
- 
completeEditingprotected void completeEditing(boolean messageStop, boolean messageCancel, boolean messageTree)編集中セッションを中止します。messageStopがtrueの場合、stopEditingでエディタにメッセージが送信されます。messageCancelがtrueであれば、エディタはcancelEditingでメッセージされます。messageTreeがtrueの場合、treeModelはvalueForPathChangedでメッセージされます。- パラメータ:
- messageStop- 編集を中止するメッセージ
- messageCancel- 編集を取消するメッセージ
- messageTree- ツリーへのメッセージ
 
- 
startEditingprotected boolean startEditing(TreePath path, MouseEvent event)cellEditorがあり、shouldSelectCellがtrueを返した場合、ノードの編集を開始します。このメソッドは、パスが有効であり、可視であると見なします。 - パラメータ:
- path- ツリー・パス
- event- マウス・イベント
- 戻り値:
- true編集が成功した場合
 
- 
checkForClickInExpandControlprotected void checkForClickInExpandControl(TreePath path, int mouseX, int mouseY)mouseXおよびmouseYがrowの展開または折りたたみの領域にある場合、このメソッドは行の展開状態を切り替えます。- パラメータ:
- path- ツリー・パス
- mouseX- X座標
- mouseY- Y座標
 
- 
isLocationInExpandControlprotected boolean isLocationInExpandControl(TreePath path, int mouseX, int mouseY)mouseXとmouseYが、ノードを展開/折りたたむために使用される行の領域に入る場合はtrueを返し、rowのノードはリーフを表しません。- パラメータ:
- path- ツリー・パス
- mouseX- X座標
- mouseY- Y座標
- 戻り値:
- trueマウス・カーソルが、ノードを展開/折りたたむために使用される行の領域にあり、ノードがリーフでない場合。
 
- 
handleExpandControlClickprotected void handleExpandControlClick(TreePath path, int mouseX, int mouseY)ユーザーが特定の行をクリックするとメッセージが送られ、toggleExpandStateが呼び出されます。- パラメータ:
- path- ツリー・パス
- mouseX- X座標
- mouseY- Y座標
 
- 
toggleExpandStateprotected void toggleExpandState(TreePath path)パスが展開されてない場合は展開し、行が展開されている場合は折りたたみます。 パスを展開し、展開時にJTreeがスクロールすると、ensureRowsAreVisibleが呼び出され、できるだけ多くの子をスクロールして(パスの最後の子孫にスクロールしようとします。)として表示します。- パラメータ:
- path- ツリー・パス
 
- 
isToggleSelectionEventprotected boolean isToggleSelectionEvent(MouseEvent event)trueを返すと、ノード上のマウス・イベントは、マウスの下の行のみの選択を切り替える必要があることを示します。- パラメータ:
- event- マウス・イベント
- 戻り値:
- trueノード上のマウス・イベントで選択項目を切り替える必要がある場合
 
- 
isMultiSelectEventprotected boolean isMultiSelectEvent(MouseEvent event)trueを返すと、ノード上のマウス・イベントがアンカー・ポイントから選択されることを意味します。- パラメータ:
- event- マウス・イベント
- 戻り値:
- ノード上のマウス・イベントがアンカー・ポイントから選択する必要がある場合はtrue
 
- 
isToggleEventprotected boolean isToggleEvent(MouseEvent event)trueを返すと、マウスの下の行がイベントに基づいてトグルされるべきであることが示されます。 これはcheckForClickInExpandControlの後に呼び出され、ロケーションがexpand (toggle)コントロールにないことを意味します。- パラメータ:
- event- マウス・イベント
- 戻り値:
- trueマウスの下の行をトグルする必要がある場合
 
- 
selectPathForEventprotected void selectPathForEvent(TreePath path, MouseEvent event)特定の行のMouseEventに基づいて選択を更新するようにメッセージを送りました。 イベントが選択切替えイベントの場合、行が選択または選択解除されます。 イベントが複数選択イベントを示す場合、選択はアンカー・ポイントから更新されます。 そうでない場合は行が選択され、イベントが切替えイベントを示す場合は行の展開または折りたたみが行われます。- パラメータ:
- path- 選択されたパス
- event- マウス・イベント
 
- 
isLeafprotected boolean isLeaf(int row)rowのノードがリーフの場合、trueを返します。- パラメータ:
- row- 行
- 戻り値:
- rowのノードがリーフの場合は- true
 
- 
updateLeadSelectionRowprotected void updateLeadSelectionRow()選択のリード行を更新します。- 導入されたバージョン:
- 1.7
 
- 
getLeadSelectionRowprotected int getLeadSelectionRow()選択のリード行を返します。- 戻り値:
- 選択リード行
- 導入されたバージョン:
- 1.7
 
 
-