- java.lang.Object
- 
- javax.swing.plaf.ComponentUI
- 
- javax.swing.plaf.TreeUI
- 
- javax.swing.plaf.basic.BasicTreeUI
- 
- javax.swing.plaf.synth.SynthTreeUI
 
 
 
 
- 
- すべての実装されたインタフェース:
- PropertyChangeListener,- EventListener,- SynthConstants,- SynthUI
 
 
 public class SynthTreeUI extends BasicTreeUI implements PropertyChangeListener, SynthUI JTreeのSynth L&F UIの委譲を提供します。- 導入されたバージョン:
- 1.7
 
- 
- 
ネストされたクラスのサマリー- 
クラス 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
 - 
インタフェース javax.swing.plaf.synth.SynthConstantsから継承されたフィールドDEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED
 
- 
 - 
コンストラクタのサマリーコンストラクタ コンストラクタ 説明 SynthTreeUI()
 - 
メソッドのサマリーすべてのメソッド 静的メソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 protected TreeCellEditorcreateDefaultCellEditor()デフォルトのセル・エディタを作成します。protected TreeCellRenderercreateDefaultCellRenderer()各ノードをスタンプするために使われるデフォルトのセル・レンダラを返します。static ComponentUIcreateUI(JComponent x)指定されたコンポーネントの新しいUIオブジェクトを作成します。protected voiddrawCentered(Component c, Graphics graphics, Icon icon, int x, int y)(x,y)を中心とするiconを描画します。SynthContextgetContext(JComponent c)指定されたコンポーネントのコンテキストを返します。IcongetExpandedIcon()展開されたアイコンを返します。protected intgetRowX(int row, int depth)x軸に沿って特定の行をレンダリングする位置を返します。protected voidinstallDefaults()デフォルトのプロパティをインストールします。protected voidinstallListeners()リスナーを登録します。voidpaint(Graphics g, JComponent c)Look & Feelに従って、指定されたコンポーネントをペイントします。protected voidpaint(SynthContext context, Graphics g)指定されたコンポーネントをペイントします。voidpaintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)ボーダーをペイントします。protected voidpaintDropLine(Graphics g)ドロップ・ラインをペイントします。protected voidpaintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)行の展開(切り替え)部分をペイントします。protected voidpaintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)水平線をペイントします。protected voidpaintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)脚の水平部分をペイントします。protected voidpaintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)垂直線をペイントします。protected voidpaintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)脚の垂直部分をペイントします。voidpropertyChange(PropertyChangeEvent event)バウンド・プロパティの変更時に呼び出されます。protected voiduninstallDefaults()既定のプロパティをアンインストールします。protected voiduninstallListeners()リスナーを登録解除します。voidupdate(Graphics g, JComponent c)このUI委譲に、指定されたコンポーネントを再ペイントするよう通知します。- 
クラス javax.swing.plaf.basic.BasicTreeUIから継承されたメソッド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
 - 
クラス javax.swing.plaf.ComponentUIから継承されたメソッドcontains, getAccessibleChild, getAccessibleChildrenCount
 
- 
 
- 
- 
- 
メソッドの詳細- 
createUIpublic static ComponentUI createUI(JComponent x) 指定されたコンポーネントの新しいUIオブジェクトを作成します。- パラメータ:
- x- UIオブジェクトを作成するコンポーネント
- 戻り値:
- UIオブジェクト
 
 - 
getExpandedIconpublic Icon getExpandedIcon() 展開されたアイコンを返します。- オーバーライド:
- getExpandedIcon、クラス:- BasicTreeUI
- 戻り値:
- 展開されたアイコン
 
 - 
installDefaultsprotected void installDefaults() デフォルトのプロパティをインストールします。- オーバーライド:
- installDefaults、クラス:- BasicTreeUI
 
 - 
installListenersprotected void installListeners() リスナーを登録します。- オーバーライド:
- installListeners、クラス:- BasicTreeUI
 
 - 
getContextpublic SynthContext getContext(JComponent c) 指定されたコンポーネントのコンテキストを返します。- 定義:
- getContext、インタフェース:- SynthUI
- パラメータ:
- c- SynthContextを要求するコンポーネント。
- 戻り値:
- コンポーネントを記述するSynthContext。
 
 - 
createDefaultCellEditorprotected TreeCellEditor createDefaultCellEditor() デフォルトのセル・エディタを作成します。- オーバーライド:
- createDefaultCellEditor、クラス:- BasicTreeUI
- 戻り値:
- デフォルトのセル・エディタ
 
 - 
createDefaultCellRendererprotected TreeCellRenderer createDefaultCellRenderer() 各ノードをスタンプするために使われるデフォルトのセル・レンダラを返します。- オーバーライド:
- createDefaultCellRenderer、クラス:- BasicTreeUI
- 戻り値:
- TreeCellRendererのインスタンス
 
 - 
uninstallDefaultsprotected void uninstallDefaults() 既定のプロパティをアンインストールします。- オーバーライド:
- uninstallDefaults、クラス:- BasicTreeUI
 
 - 
uninstallListenersprotected void uninstallListeners() リスナーを登録解除します。- オーバーライド:
- uninstallListeners、クラス:- BasicTreeUI
 
 - 
updatepublic void update(Graphics g, JComponent c) このUI委譲に、指定されたコンポーネントを再ペイントするよう通知します。 このメソッドはコンポーネントのバックグラウンドをペイントし、paint(SynthContext,Graphics)メソッドを呼び出します。一般に、このメソッドはサブクラスによってオーバーライドする必要はありません。 すべてのLook & Feelの描画コードを paintメソッドに入れるようにしてください。- オーバーライド:
- update、クラス:- ComponentUI
- パラメータ:
- g- ペイントに使用される- Graphicsオブジェクト
- c- ペイントされるコンポーネント
- 関連項目:
- paint(SynthContext,Graphics)
 
 - 
paintBorderpublic 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- ボーダーの高さ
 
 - 
paintpublic void paint(Graphics g, JComponent c) Look & Feelに従って、指定されたコンポーネントをペイントします。このメソッドは、Synth Look & Feelで使用されません。 ペイントは paint(SynthContext,Graphics)メソッドによって処理されます。- オーバーライド:
- paint、クラス:- BasicTreeUI
- パラメータ:
- g- ペイントに使用される- Graphicsオブジェクト
- c- ペイントされるコンポーネント
- 関連項目:
- paint(SynthContext,Graphics)
 
 - 
paintprotected void paint(SynthContext context, Graphics g) 指定されたコンポーネントをペイントします。- パラメータ:
- context- ペイントされるコンポーネントのコンテキスト
- g- ペイントに使用される- Graphicsオブジェクト
- 関連項目:
- update(Graphics,JComponent)
 
 - 
paintHorizontalPartOfLegprotected 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
- パラメータ:
- g- グラフィック・スコンテキスト
- clipBounds- クリップされた矩形
- insets- insets
- bounds- 外接する矩形
- path- ツリー・パス
- row- 行
- isExpanded- パスが展開されている場合は- true
- hasBeenExpanded- パスが展開されている場合は- true
- isLeaf- パスがリーフの場合は- true
 
 - 
paintHorizontalLineprotected void paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right) 水平線をペイントします。- オーバーライド:
- paintHorizontalLine、クラス:- BasicTreeUI
- パラメータ:
- g- グラフィック・スコンテキスト
- c- コンポーネント
- y- Y座標
- left- X1座標
- right- X2座標
 
 - 
paintVerticalPartOfLegprotected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path) 脚の垂直部分をペイントします。 レシーバは、clipBoundsやinsetsを変更しないようにしてください。- オーバーライド:
- paintVerticalPartOfLeg、クラス:- BasicTreeUI
- パラメータ:
- g- グラフィック・スコンテキスト
- clipBounds- クリップされた矩形
- insets- insets
- path- ツリー・パス
 
 - 
paintVerticalLineprotected void paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom) 垂直線をペイントします。- オーバーライド:
- paintVerticalLine、クラス:- BasicTreeUI
- パラメータ:
- g- グラフィック・スコンテキスト
- c- コンポーネント
- x- X座標
- top- Y1座標
- bottom- Y2座標
 
 - 
paintExpandControlprotected void paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) 行の展開(切り替え)部分をペイントします。 レシーバは、clipBoundsやinsetsを変更しないようにしてください。- オーバーライド:
- paintExpandControl、クラス:- BasicTreeUI
- パラメータ:
- g- グラフィック・スコンテキスト
- clipBounds- クリップされた矩形
- insets- insets
- bounds- 外接する矩形
- path- ツリー・パス
- row- 行
- isExpanded- パスが展開されている場合は- true
- hasBeenExpanded- パスが展開されている場合は- true
- isLeaf- 行がリーフの場合は- true
 
 - 
drawCenteredprotected void drawCentered(Component c, Graphics graphics, Icon icon, int x, int y) (x,y)を中心とするiconを描画します。- オーバーライド:
- drawCentered、クラス:- BasicTreeUI
- パラメータ:
- c- コンポーネント
- graphics- グラフィック・スコンテキスト
- icon- アイコン
- x- X座標
- y- Y座標
 
 - 
propertyChangepublic void propertyChange(PropertyChangeEvent event) バウンド・プロパティの変更時に呼び出されます。- 定義:
- propertyChange、インタフェース:- PropertyChangeListener
- パラメータ:
- event- イベント・ソースと変更されたプロパティを記述するPropertyChangeEventオブジェクト。
 
 - 
paintDropLineprotected void paintDropLine(Graphics g) ドロップ・ラインをペイントします。- オーバーライド:
- paintDropLine、クラス:- BasicTreeUI
- パラメータ:
- g- 描画する- Graphicsオブジェクト
 
 - 
getRowXprotected int getRowX(int row, int depth)x軸に沿って特定の行をレンダリングする位置を返します。 戻り値には、JTreeで指定されたイン・セット値は一切含まれません。 このメソッドでは、行または深さの有効性は確認しないため、行または深さがツリーのそれと一致しない場合でも、正しいと見なされて、例外をスローしません。- オーバーライド:
- getRowX、クラス:- BasicTreeUI
- パラメータ:
- row- x位置を返す行
- depth- 行の深さ
- 戻り値:
- 指定された行をインデントする量。
 
 
- 
 
-