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