public class SynthTreeUI extends BasicTreeUI implements PropertyChangeListener, SynthUI
JTree
のSynth L&F UIの委譲を提供します。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
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
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED
コンストラクタ | 説明 |
---|---|
SynthTreeUI() |
修飾子と型 | メソッド | 説明 |
---|---|---|
protected TreeCellEditor |
createDefaultCellEditor() |
デフォルトのセル・エディタを作成します。
|
protected TreeCellRenderer |
createDefaultCellRenderer() |
各ノードをスタンプするために使われるデフォルトのセル・レンダラを返します。
|
static ComponentUI |
createUI(JComponent x) |
指定されたコンポーネントの新しいUIオブジェクトを作成します。
|
protected void |
drawCentered(Component c, Graphics graphics, Icon icon, int x, int y) |
|
SynthContext |
getContext(JComponent c) |
指定されたコンポーネントのコンテキストを返します。
|
Icon |
getExpandedIcon() |
|
protected int |
getRowX(int row, int depth) |
x軸に沿って特定の行をレンダリングする位置を返します。
|
protected void |
installDefaults() |
|
protected void |
installListeners() |
|
void |
paint(Graphics g, JComponent c) |
Look & Feelに従って、指定されたコンポーネントをペイントします。
|
protected void |
paint(SynthContext context, Graphics g) |
指定されたコンポーネントをペイントします。
|
void |
paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) |
ボーダーをペイントします。
|
protected void |
paintDropLine(Graphics g) |
ドロップ・ラインをペイントします。
|
protected void |
paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) |
行の展開(切り替え)部分をペイントします。
|
protected void |
paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right) |
水平線をペイントします。
|
protected void |
paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) |
脚の水平部分をペイントします。
|
protected void |
paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom) |
垂直線をペイントします。
|
protected void |
paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path) |
脚の垂直部分をペイントします。
|
void |
propertyChange(PropertyChangeEvent event) |
バウンド・プロパティの変更時に呼び出されます。
|
protected void |
uninstallDefaults() |
|
protected void |
uninstallListeners() |
|
void |
update(Graphics g, JComponent c) |
このUI委譲に、指定されたコンポーネントを再ペイントするよう通知します。
|
cancelEditing, checkForClickInExpandControl, completeEditing, completeEditing, completeUIInstall, completeUIUninstall, configureLayoutCache, createCellEditorListener, createCellRendererPane, createComponentListener, createFocusListener, createKeyListener, createLayoutCache, createMouseListener, createNodeDimensions, createPropertyChangeListener, createSelectionModelPropertyChangeListener, createTreeExpansionListener, createTreeModelListener, createTreeSelectionListener, drawDashedHorizontalLine, drawDashedVerticalLine, ensureRowsAreVisible, getBaseline, getBaselineResizeBehavior, getCellEditor, getCellRenderer, getClosestPathForLocation, getCollapsedIcon, getDropLineRect, getEditingPath, getHashColor, getHorizontalLegBuffer, getLastChildPath, getLeadSelectionRow, getLeftChildIndent, getMaximumSize, getMinimumSize, getModel, getPathBounds, getPathForRow, getPreferredMinSize, getPreferredSize, getPreferredSize, getRightChildIndent, getRowCount, getRowForPath, getRowHeight, getSelectionModel, getShowsRootHandles, getVerticalLegBuffer, handleExpandControlClick, installComponents, installKeyboardActions, installUI, isDropLine, isEditable, isEditing, isLargeModel, isLeaf, isLocationInExpandControl, isMultiSelectEvent, isRootVisible, isToggleEvent, isToggleSelectionEvent, paintRow, 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, uninstallKeyboardActions, uninstallUI, updateCachedPreferredSize, updateCellEditor, updateDepthOffset, updateExpandedDescendants, updateLayoutCacheExpandedNodes, updateLeadSelectionRow, updateRenderer, updateSize
contains, getAccessibleChild, getAccessibleChildrenCount
public static ComponentUI createUI(JComponent x)
x
- UIオブジェクトを作成するコンポーネントpublic Icon getExpandedIcon()
getExpandedIcon
、クラスBasicTreeUI
protected void installDefaults()
installDefaults
、クラスBasicTreeUI
protected void installListeners()
installListeners
、クラスBasicTreeUI
public SynthContext getContext(JComponent c)
getContext
、インタフェースSynthUI
c
- SynthContextを要求するコンポーネント。protected TreeCellEditor createDefaultCellEditor()
createDefaultCellEditor
、クラスBasicTreeUI
protected TreeCellRenderer createDefaultCellRenderer()
createDefaultCellRenderer
、クラスBasicTreeUI
protected void uninstallDefaults()
uninstallDefaults
、クラスBasicTreeUI
protected void uninstallListeners()
uninstallListeners
、クラスBasicTreeUI
public void update(Graphics g, JComponent c)
paint(SynthContext,Graphics)
メソッドを呼び出します。
一般に、このメソッドはサブクラスによってオーバーライドする必要はありません。 すべてのLook & Feelの描画コードをpaint
メソッドに入れるようにしてください。
update
、クラスComponentUI
g
- ペイントに使用されるGraphics
オブジェクトc
- ペイントされるコンポーネントpaint(SynthContext,Graphics)
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
paintBorder
、インタフェースSynthUI
context
- コンポーネント・コンテキストg
- ペイントされるGraphics
x
- X座標y
- Y座標w
- ボーダーの幅h
- ボーダーの高さpublic void paint(Graphics g, JComponent c)
このメソッドは、Synth Look & Feelで使用されません。 ペイントはpaint(SynthContext,Graphics)
メソッドによって処理されます。
paint
、クラスBasicTreeUI
g
- ペイントに使用されるGraphics
オブジェクトc
- ペイントされるコンポーネントpaint(SynthContext,Graphics)
protected void paint(SynthContext context, Graphics g)
context
- ペイントされるコンポーネントのコンテキストg
- ペイントに使用されるGraphics
オブジェクトupdate(Graphics,JComponent)
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になることがあります。
paintHorizontalPartOfLeg
、クラスBasicTreeUI
protected void paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)
paintHorizontalLine
、クラスBasicTreeUI
protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
clipBounds
やinsets
を変更しないようにしてください。 paintVerticalPartOfLeg
、クラスBasicTreeUI
protected void paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)
paintVerticalLine
、クラスBasicTreeUI
protected void paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
clipBounds
やinsets
を変更しないようにしてください。 paintExpandControl
、クラスBasicTreeUI
protected void drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
drawCentered
、クラスBasicTreeUI
public void propertyChange(PropertyChangeEvent event)
propertyChange
、インタフェースPropertyChangeListener
event
- イベント・ソースと変更されたプロパティを記述するPropertyChangeEventオブジェクト。protected void paintDropLine(Graphics g)
paintDropLine
、クラスBasicTreeUI
g
- 描画するGraphics
オブジェクトprotected int getRowX(int row, int depth)
getRowX
、クラスBasicTreeUI
row
- x位置を返す行depth
- 行の深さ バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。