- 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
 
- 
 
- 
- 
- 
メソッドの詳細- 
createUIpublic static ComponentUI createUI(JComponent x) MetalTreeUIを構築します。- パラメータ:
- x- コンポーネント
- 戻り値:
- MetalTreeUIのインスタンス
 
 - 
decodeLineStyleprotected void decodeLineStyle(Object lineStyleFlag) クライアント・プロパティに渡された文字列と内部表現の間の変換(現在およびint)- パラメータ:
- lineStyleFlag- フラグ
 
 - 
isLocationInExpandControlprotected 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の点が拡大制御されている場合。
 
 - 
paintHorizontalSeparatorsprotected void paintHorizontalSeparators(Graphics g, JComponent c) 水平の区切り線をペイントします。- パラメータ:
- g-- Graphicsのインスタンス
- c- コンポーネント
 
 
- 
 
-