java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TreeUI
javax.swing.plaf.basic.BasicTreeUI
javax.swing.plaf.metal.MetalTreeUI
public class MetalTreeUI extends BasicTreeUI
TreeUIのMetal Look & Feel実装です。
MetalTreeUIがノード間の間隔と輪郭を可視的に描画する方法を構成できるようにします。 次のヒントをサポートします。
| ヒント | 説明 |
|---|---|
| 斜線 | 子と親を結ぶ線が描かれる。 ルート・ノードの処理については、JTree.setRootVisible(boolean)およびJTree.setShowsRootHandles(boolean)を参照。
|
| Horizontal | ルート・ノードの子を区分する水平線が描かれる |
| なし | ノード間に視覚的な指示を与える線を描かない |
通常、JTreeからTreeUIを取得してMetalTreeUIのインスタンスにキャストするのは実際的な方法ではないので、クライアント・プロパティJTree.lineStyleを使用してこのプロパティを有効にします。 たとえば、Horizontalスタイルに切り替えるには、tree.putClientProperty("JTree.lineStyle", "Horizontal");を実行します。
デフォルトはAngledです。
-
ネストされたクラスのサマリー
クラス javax.swing.plaf.basic.BasicTreeUIで宣言されたネストされたクラス/インタフェース
BasicTreeUI.CellEditorHandler, BasicTreeUI.ComponentHandler, BasicTreeUI.FocusHandler, BasicTreeUI.KeyHandler, BasicTreeUI.MouseHandler, BasicTreeUI.MouseInputHandler, BasicTreeUI.NodeDimensionsHandler, BasicTreeUI.PropertyChangeHandler, BasicTreeUI.SelectionModelPropertyChangeHandler, BasicTreeUI.TreeCancelEditingAction, BasicTreeUI.TreeExpansionHandler, BasicTreeUI.TreeHomeAction, BasicTreeUI.TreeIncrementAction, BasicTreeUI.TreeModelHandler, BasicTreeUI.TreePageAction, BasicTreeUI.TreeSelectionHandler, BasicTreeUI.TreeToggleAction, BasicTreeUI.TreeTraverseAction -
フィールドのサマリー
クラス javax.swing.plaf.basic.BasicTreeUIで宣言されたフィールド
cellEditor, collapsedIcon, createdCellEditor, createdRenderer, currentCellRenderer, depthOffset, drawingCache, editingComponent, editingPath, editingRow, editorHasDifferentSize, expandedIcon, largeModel, lastSelectedRow, leftChildIndent, nodeDimensions, preferredMinSize, preferredSize, rendererPane, rightChildIndent, stopEditingInCompleteEditing, totalChildIndent, tree, treeModel, treeSelectionModel, treeState, validCachedPreferredSize -
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 MetalTreeUI()MetalTreeUIを構築します。 -
メソッドのサマリー
修飾子と型 メソッド 説明 static ComponentUIcreateUI(JComponent x)MetalTreeUIを構築します。protected voiddecodeLineStyle(Object lineStyleFlag)クライアント・プロパティに渡された文字列と内部表現の間の変換(現在およびint)protected booleanisLocationInExpandControl(int row, int rowLevel, int mouseX, int mouseY)X座標mouseXとY座標mouseYの点が拡大制御されている場合は、trueを返します。protected voidpaintHorizontalSeparators(Graphics g, JComponent c)水平の区切り線をペイントします。クラス javax.swing.plaf.basic.BasicTreeUIで宣言されたメソッド
cancelEditing, checkForClickInExpandControl, completeEditing, completeEditing, completeUIInstall, completeUIUninstall, configureLayoutCache, createCellEditorListener, createCellRendererPane, createComponentListener, createDefaultCellEditor, createDefaultCellRenderer, createFocusListener, createKeyListener, createLayoutCache, createMouseListener, createNodeDimensions, createPropertyChangeListener, createSelectionModelPropertyChangeListener, createTreeExpansionListener, createTreeModelListener, createTreeSelectionListener, drawCentered, drawDashedHorizontalLine, drawDashedVerticalLine, ensureRowsAreVisible, getBaseline, getBaselineResizeBehavior, getCellEditor, getCellRenderer, getClosestPathForLocation, getCollapsedIcon, getDropLineRect, getEditingPath, getExpandedIcon, getHashColor, getHorizontalLegBuffer, getLastChildPath, getLeadSelectionRow, getLeftChildIndent, getMaximumSize, getMinimumSize, getModel, getPathBounds, getPathForRow, getPreferredMinSize, getPreferredSize, getPreferredSize, getRightChildIndent, getRowCount, getRowForPath, getRowHeight, getRowX, getSelectionModel, getShowsRootHandles, getVerticalLegBuffer, handleExpandControlClick, installComponents, installDefaults, installKeyboardActions, installListeners, isDropLine, isEditable, isEditing, isLargeModel, isLeaf, isLocationInExpandControl, isMultiSelectEvent, isRootVisible, isToggleEvent, isToggleSelectionEvent, paintDropLine, paintExpandControl, paintHorizontalLine, paintHorizontalPartOfLeg, paintRow, paintVerticalLine, paintVerticalPartOfLeg, pathWasCollapsed, pathWasExpanded, prepareForUIInstall, prepareForUIUninstall, selectPathForEvent, setCellEditor, setCellRenderer, setCollapsedIcon, setEditable, setExpandedIcon, setHashColor, setLargeModel, setLeftChildIndent, setModel, setPreferredMinSize, setRightChildIndent, setRootVisible, setRowHeight, setSelectionModel, setShowsRootHandles, shouldPaintExpandControl, startEditing, startEditingAtPath, stopEditing, toggleExpandState, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, updateCachedPreferredSize, updateCellEditor, updateDepthOffset, updateExpandedDescendants, updateLayoutCacheExpandedNodes, updateLeadSelectionRow, updateRenderer, updateSizeクラス javax.swing.plaf.ComponentUIで宣言されたメソッド
contains, getAccessibleChild, getAccessibleChildrenCount, installUI, paint, uninstallUI, update
-
コンストラクタの詳細
-
MetalTreeUI
public MetalTreeUI()MetalTreeUIを構築します。
-
-
メソッドの詳細
-
createUI
public static ComponentUI createUI(JComponent x)MetalTreeUIを構築します。- パラメータ:
x- コンポーネント- 戻り値:
MetalTreeUIのインスタンス
-
decodeLineStyle
protected void decodeLineStyle(Object lineStyleFlag)クライアント・プロパティに渡された文字列と内部表現の間の変換(現在およびint)- パラメータ:
lineStyleFlag- フラグ
-
isLocationInExpandControl
protected boolean isLocationInExpandControl(int row, int rowLevel, int mouseX, int mouseY)X座標mouseXとY座標mouseYの点が拡大制御されている場合は、trueを返します。- パラメータ:
row- 行rowLevel- 行レベルmouseX- X座標mouseY- Y座標- 戻り値:
trueX座標がmouseXで、Y座標がmouseYの点が拡大制御されている場合。
-
paintHorizontalSeparators
protected void paintHorizontalSeparators(Graphics g, JComponent c)水平の区切り線をペイントします。- パラメータ:
g-Graphicsのインスタンスc- コンポーネント
-