- 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)を参照。水平 ルート・ノードの子を区分する水平線が描かれる なし ノード間に視覚的な指示を与える線を描かない 通常、
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
-
-
-
-
メソッドの詳細
-
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- コンポーネント
-
-