- 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
-
-
-
-
フィールドの詳細
-
collapsedIcon
protected transient Icon collapsedIcon
折りたたまれたアイコン。
-
expandedIcon
protected transient Icon expandedIcon
展開されたアイコン。
-
leftChildIndent
protected int leftChildIndent
左マージンと垂直の破線が描画される位置の間の距離です。
-
rightChildIndent
protected int rightChildIndent
セルの内容が描画される位置を決定するためにleftChildIndentに加算される距離です。
-
totalChildIndent
protected int totalChildIndent
インデントされる総距離です。 leftChildIndentとrightChildIndentの合計です。
-
preferredMinSize
protected Dimension preferredMinSize
推奨される最小サイズです。
-
lastSelectedRow
protected int lastSelectedRow
最後に選択された行のインデックスです。
-
tree
protected JTree tree
描画先のコンポーネントです。
-
currentCellRenderer
protected transient TreeCellRenderer currentCellRenderer
実際のセルの描画を行うために使われているレンダラです。
-
createdRenderer
protected boolean createdRenderer
現在ツリーにあるレンダラがこのインスタンスによって作成された場合にtrueに設定されます。
-
cellEditor
protected transient TreeCellEditor cellEditor
ツリーのエディタです。
-
createdCellEditor
protected boolean createdCellEditor
現在ツリーにあるエディタがこのインスタンスによって作成された場合にtrueに設定されます。
-
stopEditingInCompleteEditing
protected boolean stopEditingInCompleteEditing
編集時に、shouldSelectCell()がtrueを返した場合にfalseに設定されます。これは、completeEditingで使用され、ノードが編集前に選択されなければならないことを意味しています。
-
rendererPane
protected CellRendererPane rendererPane
TreeCellRendererをペイントするために使われます。
-
preferredSize
protected Dimension preferredSize
すべてのノードを完全に表示するために必要なサイズです。
-
validCachedPreferredSize
protected boolean validCachedPreferredSize
preferredSizeが有効かどうかを示します。
-
treeState
protected AbstractLayoutCache treeState
サイズ変更や展開されているかどうかを処理するオブジェクトです。
-
largeModel
protected boolean largeModel
largeModelの最適化を行なっている場合はtrueです。 これをサポートしないサブクラスは、FixedHeightLayoutCacheのインスタンスを返さないようにcreateLayoutCacheをオーバーライドすることをお勧めします。
-
nodeDimensions
protected AbstractLayoutCache.NodeDimensions nodeDimensions
TreeStateに対しノードに必要なサイズを通知します。
-
treeModel
protected TreeModel treeModel
何を表示するかを決定するために使われます。
-
treeSelectionModel
protected TreeSelectionModel treeSelectionModel
選択を維持するモデルです。
-
depthOffset
protected int depthOffset
x位置を正確に計算するための深さのオフセットの量です。 これは、ルートが可視かどうか、ルート・ハンドルが可視どうかによって決まります。
-
editingComponent
protected Component editingComponent
これは編集時に、実際の編集を行うComponentになります。
-
editingPath
protected TreePath editingPath
編集中のパスです。
-
editingRow
protected int editingRow
編集中の行です。 editingComponentがnullではない場合だけ参照されます。
-
editorHasDifferentSize
protected boolean editorHasDifferentSize
エディタのサイズがレンダラと異なる場合にtrueに設定されます。
-
-
メソッドの詳細
-
createUI
public static ComponentUI createUI(JComponent x)
BasicTreeUIの新しいインスタンスを構築します。- パラメータ:
x- コンポーネント- 戻り値:
BasicTreeUIの新しいインスタンス
-
getHashColor
protected Color getHashColor()
ハッシュの色を返します。- 戻り値:
- ハッシュ・カラー
-
setHashColor
protected void setHashColor(Color color)
ハッシュ・カラーを設定します。- パラメータ:
color- ハッシュ・カラー
-
setLeftChildIndent
public void setLeftChildIndent(int newAmount)
左の子インデントを設定します。- パラメータ:
newAmount- 左の子インデント
-
getLeftChildIndent
public int getLeftChildIndent()
左の子インデントを返します。- 戻り値:
- 左の子インデント
-
setRightChildIndent
public void setRightChildIndent(int newAmount)
右の子インデントを設定します。- パラメータ:
newAmount- 右の子インデント
-
getRightChildIndent
public int getRightChildIndent()
右の子インデントを返します。- 戻り値:
- 右の子インデント
-
setExpandedIcon
public void setExpandedIcon(Icon newG)
展開されたアイコンを設定します。- パラメータ:
newG- 展開されたアイコン
-
getExpandedIcon
public Icon getExpandedIcon()
展開されたアイコンを返します。- 戻り値:
- 展開されたアイコン
-
setCollapsedIcon
public void setCollapsedIcon(Icon newG)
折りたたまれたアイコンを設定します。- パラメータ:
newG- 折りたたまれたアイコン
-
getCollapsedIcon
public Icon getCollapsedIcon()
折りたたまれたアイコンを返します。- 戻り値:
- 折りたたまれたアイコン
-
setLargeModel
protected void setLargeModel(boolean largeModel)
必要な場合に、componentListenerを更新します。- パラメータ:
largeModel- 新しい価値
-
isLargeModel
protected boolean isLargeModel()
大きなモデルが設定されている場合、trueを返します。- 戻り値:
- 大型モデルが設定されている場合は
true
-
setRowHeight
protected void setRowHeight(int rowHeight)
treeStateに転送される、行の高さを設定します。- パラメータ:
rowHeight- 行の高さ
-
getRowHeight
protected int getRowHeight()
行の高さを返します。- 戻り値:
- 行の高さ
-
setCellRenderer
protected void setCellRenderer(TreeCellRenderer tcr)
TreeCellRendererをtcrに設定します。 これにより、updateRendererが呼び出されます。- パラメータ:
tcr- 新しい価値
-
getCellRenderer
protected TreeCellRenderer getCellRenderer()
currentCellRendererを返します。これはツリー・レンダラか、defaultCellRendererです。これはnullではありません。- 戻り値:
TreeCellRendererのインスタンス
-
setModel
protected void setModel(TreeModel model)
TreeModelを設定します。- パラメータ:
model- 新しい価値
-
getModel
protected TreeModel getModel()
ツリー・モデルを返します。- 戻り値:
- ツリー・モデル
-
setRootVisible
protected void setRootVisible(boolean newValue)
ルートを可視に設定します。- パラメータ:
newValue- 新しい値
-
isRootVisible
protected boolean isRootVisible()
ツリー・ルートが表示されている場合はtrueを返します。- 戻り値:
true、ツリー・ルートが表示されている場合
-
setShowsRootHandles
protected void setShowsRootHandles(boolean newValue)
ノードのハンドルが表示されるかどうかを決めます。- パラメータ:
newValue- 新しい値
-
getShowsRootHandles
protected boolean getShowsRootHandles()
ルート・ハンドルが表示される場合はtrueを返します。- 戻り値:
- ルート・ハンドルが表示される場合は
true
-
setCellEditor
protected void setCellEditor(TreeCellEditor editor)
セル・エディタを設定します。- パラメータ:
editor- 新しいセル・エディタ
-
getCellEditor
protected TreeCellEditor getCellEditor()
TreeCellEditorのインスタンスを返します。- 戻り値:
TreeCellEditorのインスタンス
-
setEditable
protected void setEditable(boolean newValue)
レシーバが編集を許可するかどうかを設定します。- パラメータ:
newValue- 新しい値
-
isEditable
protected boolean isEditable()
ツリーが編集可能な場合はtrueを返します。- 戻り値:
- ツリーが編集可能な場合は
true
-
setSelectionModel
protected void setSelectionModel(TreeSelectionModel newLSM)
選択モデルをリセットします。 適切なリスナーがモデルでインストールされます。- パラメータ:
newLSM- 新しい選択モデル
-
getSelectionModel
protected TreeSelectionModel getSelectionModel()
ツリー選択モデルを返します。- 戻り値:
- ツリー選択モデル
-
getPathBounds
public Rectangle getPathBounds(JTree tree, TreePath path)
パスの最後の項目が描画されるラベル部分を囲むRectangleを返します。 パスのコンポーネントのどれかが現在有効な場合は、nullが返されます。- 定義:
getPathBounds、クラスTreeUI- パラメータ:
tree-pathのJTreepath- ノードを識別するTreePath- 戻り値:
- パスの最後のアイテムが描画されるラベル部分を囲む
Rectangle、パス内のコンポーネントが現在有効な場合はnull。
-
getPathForRow
public TreePath getPathForRow(JTree tree, int row)
渡されたrowのパスを返します。 rowが可視でない場合は、nullが返されます。- 定義:
getPathForRow、クラスTreeUI- パラメータ:
tree-JTreeオブジェクトrow- 行を指定する整数- 戻り値:
rowが表示されない場合はrowまたはnullのpath
-
getRowForPath
public int getRowForPath(JTree tree, TreePath path)
pathで識別される最後の項目が可視である行を返します。 path内のどの要素も現在は可視でない場合は、-1を返します。- 定義:
getRowForPath、クラスTreeUI- パラメータ:
tree-pathのJTreepath- 見るTreePathオブジェクト- 戻り値:
pathの要素のどれかが現在可視でない場合は -1を返します。
-
getRowCount
public int getRowCount(JTree tree)
表示されている行数を返します。- 定義:
getRowCount、クラスTreeUI- パラメータ:
tree- 行数をカウントするJTree- 戻り値:
- 表示されている行の数を指定する整数
-
getClosestPathForLocation
public TreePath getClosestPathForLocation(JTree tree, int x, int y)
x、yにもっとも近いノードへのパスを返します。 現在可視のものがない場合は、nullを返します。そうでない場合は、常に有効なパスを返します。 返されたオブジェクトが正確にx, yにあるかどうかを判定する必要がある場合は、返されたパスの矩形を取得して、x, yと比較するようにしてください。- 定義:
getClosestPathForLocation、クラスTreeUI- パラメータ:
tree-JTreeオブジェクトx- 表示領域の左端から水平方向にピクセル数を与える整数。y- 表示領域の上端からの垂直距離をピクセル単位で示す整数値(上マージンは除く)- 戻り値:
- 現在表示されているものがない場合は、
x,yまたはnullに最も近いTreePathノード
-
isEditing
public boolean isEditing(JTree tree)
ツリーが編集中の場合にtrueを返します。 編集中の項目を取得するには、getEditingPath()を使います。
-
stopEditing
public boolean stopEditing(JTree tree)
現在の編集セッションを中止します。 ツリーが編集中でない場合は、このメソッドは何も行いません。 エディタが編集セッションの中止を許可した場合は、trueを返します。- 定義:
stopEditing、クラスTreeUI- パラメータ:
tree-JTreeオブジェクト- 戻り値:
- エディタが編集セッションを停止できる場合はtrue
-
cancelEditing
public void cancelEditing(JTree tree)
現在の編集セッションを取り消します。- 定義:
cancelEditing、クラスTreeUI- パラメータ:
tree-JTreeオブジェクト
-
startEditingAtPath
public void startEditingAtPath(JTree tree, TreePath path)
pathの最後の項目を選択し、その項目の編集を試みます。 CellEditorが選択された項目の編集を許可しない場合、編集は失敗します。- 定義:
startEditingAtPath、クラスTreeUI- パラメータ:
tree- 編集中のJTreepath- 編集するTreePath
-
getEditingPath
public TreePath getEditingPath(JTree tree)
編集中の要素へのパスを返します。- 定義:
getEditingPath、クラスTreeUI- パラメータ:
tree- パスを返すJTree- 戻り値:
treeへのパスを含むTreePath
-
prepareForUIInstall
protected void prepareForUIInstall()
treeインスタンス変数の設定後、デフォルトおよびリスナーがインストールされる前に呼び出されます。
-
completeUIInstall
protected void completeUIInstall()
すべてのデフォルトおよびリスナーがインストールされたあとにinstallUIから呼び出されます。
-
installDefaults
protected void installDefaults()
デフォルトのプロパティをインストールします。
-
installListeners
protected void installListeners()
リスナーを登録します。
-
installKeyboardActions
protected void installKeyboardActions()
キーボード操作を登録します。
-
installComponents
protected void installComponents()
レンダラ・ペインである、ツリーのサブコンポーネントをインストールします。
-
createNodeDimensions
protected AbstractLayoutCache.NodeDimensions createNodeDimensions()
ツリー内の指定されたノードのサイズを決定できるNodeDimensionsのインスタンスを作成します。- 戻り値:
NodeDimensionsのインスタンス
-
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener()
ツリーの変更に基づいてUIを更新するリスナーを作成します。- 戻り値:
PropertyChangeListenerのインスタンス
-
createMouseListener
protected MouseListener createMouseListener()
マウス・イベントに基づいて選択を更新するリスナーを作成します。- 戻り値:
MouseListenerのインスタンス
-
createFocusListener
protected FocusListener createFocusListener()
フォーカスを喪失または取得したときに表示を更新するリスナーを作成します。- 戻り値:
FocusListenerのインスタンス
-
createKeyListener
protected KeyListener createKeyListener()
ツリーからキー・イベントを取得するリスナーを作成します。- 戻り値:
KeyListenerのインスタンス
-
createSelectionModelPropertyChangeListener
protected PropertyChangeListener createSelectionModelPropertyChangeListener()
選択モデルからプロパティ変更イベントを取得するリスナーを作成します。- 戻り値:
PropertyChangeListenerのインスタンス
-
createTreeSelectionListener
protected TreeSelectionListener createTreeSelectionListener()
選択変更メソッドに基づいて表示を更新するリスナーを作成します。- 戻り値:
TreeSelectionListenerのインスタンス
-
createCellEditorListener
protected CellEditorListener createCellEditorListener()
現在のエディタからのイベントを処理するリスナーを作成します。- 戻り値:
CellEditorListenerのインスタンス
-
createComponentListener
protected ComponentListener createComponentListener()
新しいComponentHandlerを作成し、それを返します。 これは、大きなモデルで、コンポーネントが移動したときにvalidCachedPreferredSizeを無効にするために使用されます。- 戻り値:
ComponentListenerのインスタンス
-
createTreeExpansionListener
protected TreeExpansionListener createTreeExpansionListener()
ノードの展開状態が変更されたときにツリーの状態を更新するオブジェクトを作成し、それを返します。- 戻り値:
TreeExpansionListenerのインスタンス
-
createLayoutCache
protected AbstractLayoutCache createLayoutCache()
何が展開されているかおよびノードのサイズを管理するオブジェクトを作成します。- 戻り値:
- 拡張されたものを管理するオブジェクト
-
createCellRendererPane
protected CellRendererPane createCellRendererPane()
レンダラ・コンポーネントが配置されているレンダラ・ペインを返します。- 戻り値:
CellRendererPaneのインスタンス
-
createDefaultCellEditor
protected TreeCellEditor createDefaultCellEditor()
デフォルトのセル・エディタを作成します。- 戻り値:
- デフォルトのセル・エディタ
-
createDefaultCellRenderer
protected TreeCellRenderer createDefaultCellRenderer()
各ノードをスタンプするために使われるデフォルトのセル・レンダラを返します。- 戻り値:
TreeCellRendererのインスタンス
-
createTreeModelListener
protected TreeModelListener createTreeModelListener()
モデルが変更されたときにツリーを更新できるリスナーを返します。- 戻り値:
TreeModelListenerのインスタンス。
-
prepareForUIUninstall
protected void prepareForUIUninstall()
UIをアンストールする前に呼び出されます。
-
completeUIUninstall
protected void completeUIUninstall()
UIをアンインストールします。
-
uninstallDefaults
protected void uninstallDefaults()
既定のプロパティをアンインストールします。
-
uninstallListeners
protected void uninstallListeners()
リスナーを登録解除します。
-
uninstallKeyboardActions
protected void uninstallKeyboardActions()
キーボード操作の登録を解除します。
-
uninstallComponents
protected void uninstallComponents()
レンダラ・ペインをアンインストールします。
-
getBaseline
public int getBaseline(JComponent c, int width, int height)
ベースラインを返します。- オーバーライド:
getBaseline、クラスComponentUI- パラメータ:
c- ベースラインが要求されるJComponentwidth- ベースラインを取得する幅height- ベースラインを取得する高さ- 戻り値:
- ベースラインまたは0より小さい値(適切なベースラインがないことを示す)
- 例外:
NullPointerException-cがnullである場合IllegalArgumentException- 幅または高さが0より小さい場合- 導入されたバージョン:
- 1.6
- 関連項目:
JComponent.getBaseline(int, int)
-
getBaselineResizeBehavior
public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
サイズの変化に合わせてコンポーネントのベースラインがどのように変化するかを示す列挙を返します。- オーバーライド:
getBaselineResizeBehavior、クラスComponentUI- パラメータ:
c- ベースラインのサイズ変更の動作を返すJComponent- 戻り値:
- コンポーネント・サイズの変化に合わせてベースラインがどのように変化するかを示す列挙
- 例外:
NullPointerException-cがnullである場合- 導入されたバージョン:
- 1.6
- 関連項目:
JComponent.getBaseline(int, int)
-
isDropLine
protected boolean isDropLine(JTree.DropLocation loc)
DropLocationをノード間のラインによって示すかどうかを通知します。 これはjavax.swing.DropMode.INSERTおよびjavax.swing.DropMode.ON_OR_INSERTドロップ・モードで使用されます。- パラメータ:
loc-DropLocation- 戻り値:
- ドロップ位置をラインとして示す場合は
true - 導入されたバージョン:
- 1.7
-
paintDropLine
protected void paintDropLine(Graphics g)
ドロップ・ラインをペイントします。- パラメータ:
g- 描画するGraphicsオブジェクト- 導入されたバージョン:
- 1.7
-
getDropLineRect
protected Rectangle getDropLineRect(JTree.DropLocation loc)
ドロップ・ラインのアンバウンディング・ボックスを返します。- パラメータ:
loc-DropLocation- 戻り値:
- ドロップ・ラインのバウンディング・ボックス
- 導入されたバージョン:
- 1.7
-
paintHorizontalPartOfLeg
protected 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- insetsbounds- 外接する矩形path- ツリー・パスrow- 行isExpanded- パスが展開されている場合はtruehasBeenExpanded- パスが展開されている場合はtrueisLeaf- パスがリーフの場合はtrue
-
paintVerticalPartOfLeg
protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
脚の垂直部分をペイントします。 レシーバは、clipBoundsやinsetsを変更しないようにしてください。- パラメータ:
g- グラフィックス・コンテキストclipBounds- クリップされた矩形insets- insetspath- ツリー・パス
-
paintExpandControl
protected 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- insetsbounds- 外接する矩形path- ツリー・パスrow- 行isExpanded- パスが展開されている場合はtruehasBeenExpanded- パスが展開されている場合はtrueisLeaf- 行がリーフの場合はtrue
-
paintRow
protected 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- insetsbounds- 外接する矩形path- ツリー・パスrow- 行isExpanded- パスが展開されている場合はtruehasBeenExpanded- パスが展開されている場合はtrueisLeaf- パスがリーフの場合はtrue
-
shouldPaintExpandControl
protected boolean shouldPaintExpandControl(TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
(toggle)コントロールを展開して指定された行に描画する必要がある場合は、trueを返します。- パラメータ:
path- ツリー・パスrow- 行isExpanded- パスが展開されている場合はtruehasBeenExpanded- パスが展開されている場合はtrueisLeaf- 行がリーフの場合はtrue- 戻り値:
- 指定された行の(toggle)コントロールを展開する必要がある場合は
true
-
paintVerticalLine
protected void paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)
垂直線をペイントします。- パラメータ:
g- グラフィックス・コンテキストc- コンポーネントx- X座標top- Y1座標bottom- Y2座標
-
paintHorizontalLine
protected void paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)
水平線をペイントします。- パラメータ:
g- グラフィックス・コンテキストc- コンポーネントy- Y座標left- X1座標right- X2座標
-
getVerticalLegBuffer
protected int getVerticalLegBuffer()
ノード間の脚の垂直要素は、デフォルトでは親ノードの下端から始まります。 このメソッドは、脚がそれより下で始まるようにします。- 戻り値:
- 垂直バッファ
-
getHorizontalLegBuffer
protected int getHorizontalLegBuffer()
ノード間の脚の水平要素は、デフォルトでは子ノードの左側の右で始まります。 このメソッドは、脚がそれより前で終わるようにします。- 戻り値:
- 水平バッファ
-
drawCentered
protected void drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
(x,y)を中心とするiconを描画します。- パラメータ:
c- コンポーネントgraphics- グラフィックス・コンテキストicon- アイコンx- X座標y- Y座標
-
drawDashedHorizontalLine
protected void drawDashedHorizontalLine(Graphics g, int y, int x1, int x2)
水平の破線を描画します。x1<=x2とします。x1がx2より大きい場合、このメソッドは何も描画しません。- パラメータ:
g-Graphicsのインスタンスy- Y座標x1- X1座標x2- X2座標
-
drawDashedVerticalLine
protected void drawDashedVerticalLine(Graphics g, int x, int y1, int y2)
垂直の破線を描画します。y1<=y2とします。y1がy2より大きい場合、このメソッドは何も描画しません。- パラメータ:
g-Graphicsのインスタンスx- X座標y1- Y1座標y2- Y2座標
-
getRowX
protected int getRowX(int row, int depth)x軸に沿って特定の行をレンダリングする位置を返します。 戻り値には、JTreeで指定されたイン・セット値は一切含まれません。 このメソッドでは、行または深さの有効性は確認しないため、行または深さがツリーのそれと一致しない場合でも、正しいと見なされて、例外をスローしません。- パラメータ:
row- x位置を返す行depth- 行の深さ- 戻り値:
- 指定された行をインデントする量。
- 導入されたバージョン:
- 1.5
-
updateLayoutCacheExpandedNodes
protected void updateLayoutCacheExpandedNodes()
JTreeで展開されているすべてのノードをLayoutCacheで展開します。 これにより、ルート・パスでupdateExpandedDescendantsが呼び出されます。
-
updateExpandedDescendants
protected void updateExpandedDescendants(TreePath path)
ツリーから展開されている子孫を取得し、ツリー状態に転送することで、pathのすべての子孫の展開状態を更新します。- パラメータ:
path- ツリー・パス
-
getLastChildPath
protected TreePath getLastChildPath(TreePath parent)
parentの最後の子のパスを返します。- パラメータ:
parent- ツリー・パス- 戻り値:
parentの最後の子へのパス
-
updateDepthOffset
protected void updateDepthOffset()
各深さをどのくらいオフセットするべきかを更新します。
-
updateCellEditor
protected void updateCellEditor()
現在含まれているJTreeが編集できるかどうかに応じてcellEditorを更新します。 ツリーが編集できるが、cellEditorがない場合、基本的なセル・エディタが使われます。
-
updateRenderer
protected void updateRenderer()
レンダラが変更されたときにツリーからメッセージとして送られます。
-
configureLayoutCache
protected void configureLayoutCache()
Look & Feelを提供しているツリーに基づいてTreeStateのインスタンスをリセットします。
-
updateSize
protected void updateSize()
キャッシュされているサイズを無効とマークし、treeDidChangeでメッセージをツリーに送ります。
-
updateCachedPreferredSize
protected void updateCachedPreferredSize()
getPreferredSize()から返されるpreferredSizeインスタンス変数を更新します。左から右方向の場合、サイズは現在のAbstractLayoutCacheから決定されます。 右から左方向の場合、推奨サイズは幅から最小のx位置を引いた値になります。
-
pathWasExpanded
protected void pathWasExpanded(TreePath path)
VisibleTreeNodeから展開された後にメッセージが送られます。- パラメータ:
path- ツリー・パス
-
pathWasCollapsed
protected void pathWasCollapsed(TreePath path)
VisibleTreeNodeから折りたたまれた後にメッセージが送られます。- パラメータ:
path- ツリー・パス
-
ensureRowsAreVisible
protected void ensureRowsAreVisible(int beginRow, int endRow)beginRow〜endRowによって識別される行が確実に表示されるようにします。- パラメータ:
beginRow- 開始行endRow- 最後の行
-
setPreferredMinSize
public void setPreferredMinSize(Dimension newSize)
推奨される最小サイズを設定します。- パラメータ:
newSize- 新しい優先サイズ
-
getPreferredMinSize
public Dimension getPreferredMinSize()
推奨される最小サイズを返します。- 戻り値:
- 最小優先サイズ
-
getPreferredSize
public Dimension getPreferredSize(JComponent c)
ツリーを適切に表示するための優先サイズを返します。これはgetPreferredSize(c, true)のカバー・メソッドです。- オーバーライド:
getPreferredSize、クラスComponentUI- パラメータ:
c- コンポーネント- 戻り値:
- コンポーネント内のツリーを表すのに優先されるサイズ
- 関連項目:
JComponent.getPreferredSize(),LayoutManager.preferredLayoutSize(java.awt.Container)
-
getPreferredSize
public Dimension getPreferredSize(JComponent c, boolean checkConsistency)
cでツリーを表すための推奨サイズを返します。 checkConsistencyがtrueの場合、checkConsistencyが最初に送信されます。- パラメータ:
c- コンポーネントcheckConsistency-trueの整合性がチェックされている場合- 戻り値:
- コンポーネント内のツリーを表すのに優先されるサイズ
-
getMinimumSize
public Dimension getMinimumSize(JComponent c)
このコンポーネントの最小サイズを返します。 推奨される最小サイズまたは0, 0になります。- オーバーライド:
getMinimumSize、クラスComponentUI- パラメータ:
c- 最小サイズが照会されるコンポーネント。この引数は通常無視されるが、UIオブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがある- 戻り値:
Dimensionオブジェクトまたはnull- 関連項目:
JComponent.getMinimumSize(),LayoutManager.minimumLayoutSize(java.awt.Container),ComponentUI.getPreferredSize(javax.swing.JComponent)
-
getMaximumSize
public Dimension getMaximumSize(JComponent c)
このコンポーネントの最大サイズを返します。インスタンスが現在JTreeにある場合は推奨サイズ、そうでない場合は0, 0です。- オーバーライド:
getMaximumSize、クラスComponentUI- パラメータ:
c- 最大サイズが照会されるコンポーネント。この引数は通常無視されるが、UIオブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがある- 戻り値:
Dimensionオブジェクトまたはnull- 関連項目:
JComponent.getMaximumSize(),LayoutManager2.maximumLayoutSize(java.awt.Container)
-
completeEditing
protected void completeEditing()
編集中セッションを中止するメッセージを送ります。 レシーバがLook & Feelを提供しているUIがgetInvokesStopCellEditingからtrueを返す場合、stopCellEditingが現在のエディタで呼び出されます。 次にcompleteEditingがfalseまたはtrueでメッセージとして送られます。falseは、中途の編集を取り消します。
-
completeEditing
protected void completeEditing(boolean messageStop, boolean messageCancel, boolean messageTree)編集中セッションを中止します。messageStopがtrueの場合、stopEditingでエディタにメッセージが送信されます。messageCancelがtrueであれば、エディタはcancelEditingでメッセージされます。messageTreeがtrueの場合、treeModelはvalueForPathChangedでメッセージされます。- パラメータ:
messageStop- 編集を中止するメッセージmessageCancel- 編集を取消するメッセージmessageTree- ツリーへのメッセージ
-
startEditing
protected boolean startEditing(TreePath path, MouseEvent event)
cellEditorがあり、shouldSelectCellがtrueを返した場合、ノードの編集を開始します。このメソッドは、パスが有効であり、可視であると見なします。
- パラメータ:
path- ツリー・パスevent- マウス・イベント- 戻り値:
true編集が成功した場合
-
checkForClickInExpandControl
protected void checkForClickInExpandControl(TreePath path, int mouseX, int mouseY)
mouseXおよびmouseYがrowの展開または折りたたみの領域にある場合、このメソッドは行の展開状態を切り替えます。- パラメータ:
path- ツリー・パスmouseX- X座標mouseY- Y座標
-
isLocationInExpandControl
protected boolean isLocationInExpandControl(TreePath path, int mouseX, int mouseY)
mouseXとmouseYが、ノードを展開/折りたたむために使用される行の領域に入る場合はtrueを返し、rowのノードはリーフを表しません。- パラメータ:
path- ツリー・パスmouseX- X座標mouseY- Y座標- 戻り値:
trueマウス・カーソルが、ノードを展開/折りたたむために使用される行の領域にあり、ノードがリーフでない場合。
-
handleExpandControlClick
protected void handleExpandControlClick(TreePath path, int mouseX, int mouseY)
ユーザーが特定の行をクリックするとメッセージが送られ、toggleExpandStateが呼び出されます。- パラメータ:
path- ツリー・パスmouseX- X座標mouseY- Y座標
-
toggleExpandState
protected void toggleExpandState(TreePath path)
パスが展開されてない場合は展開し、行が展開されている場合は折りたたみます。 パスを展開し、展開時にJTreeがスクロールすると、ensureRowsAreVisibleが呼び出され、できるだけ多くの子をスクロールして(パスの最後の子孫にスクロールしようとします。)として表示します。- パラメータ:
path- ツリー・パス
-
isToggleSelectionEvent
protected boolean isToggleSelectionEvent(MouseEvent event)
trueを返すと、ノード上のマウス・イベントは、マウスの下の行のみの選択を切り替える必要があることを示します。- パラメータ:
event- マウス・イベント- 戻り値:
trueノード上のマウス・イベントで選択項目を切り替える必要がある場合
-
isMultiSelectEvent
protected boolean isMultiSelectEvent(MouseEvent event)
trueを返すと、ノード上のマウス・イベントがアンカー・ポイントから選択されることを意味します。- パラメータ:
event- マウス・イベント- 戻り値:
- ノード上のマウス・イベントがアンカー・ポイントから選択する必要がある場合は
true
-
isToggleEvent
protected boolean isToggleEvent(MouseEvent event)
trueを返すと、マウスの下の行がイベントに基づいてトグルされるべきであることが示されます。 これはcheckForClickInExpandControlの後に呼び出され、ロケーションがexpand (toggle)コントロールにないことを意味します。- パラメータ:
event- マウス・イベント- 戻り値:
trueマウスの下の行をトグルする必要がある場合
-
selectPathForEvent
protected void selectPathForEvent(TreePath path, MouseEvent event)
特定の行のMouseEventに基づいて選択を更新するようにメッセージを送りました。 イベントが選択切替えイベントの場合、行が選択または選択解除されます。 イベントが複数選択イベントを示す場合、選択はアンカー・ポイントから更新されます。 そうでない場合は行が選択され、イベントが切替えイベントを示す場合は行の展開または折りたたみが行われます。- パラメータ:
path- 選択されたパスevent- マウス・イベント
-
isLeaf
protected boolean isLeaf(int row)
rowのノードがリーフの場合、trueを返します。- パラメータ:
row- 行- 戻り値:
rowのノードがリーフの場合はtrue
-
updateLeadSelectionRow
protected void updateLeadSelectionRow()
選択のリード行を更新します。- 導入されたバージョン:
- 1.7
-
getLeadSelectionRow
protected int getLeadSelectionRow()
選択のリード行を返します。- 戻り値:
- 選択リード行
- 導入されたバージョン:
- 1.7
-
-