- 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 TreeCellEditor
createDefaultCellEditor()
デフォルトのセル・エディタを作成します。protected TreeCellRenderer
createDefaultCellRenderer()
各ノードをスタンプするために使われるデフォルトのセル・レンダラを返します。static ComponentUI
createUI(JComponent x)
指定されたコンポーネントの新しいUIオブジェクトを作成します。protected void
drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
(x,y)を中心とするicon
を描画します。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委譲に、指定されたコンポーネントを再ペイントするよう通知します。-
クラス 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
-
-
-
-
メソッドの詳細
-
createUI
public static ComponentUI createUI(JComponent x)
指定されたコンポーネントの新しいUIオブジェクトを作成します。- パラメータ:
x
- UIオブジェクトを作成するコンポーネント- 戻り値:
- UIオブジェクト
-
getExpandedIcon
public Icon getExpandedIcon()
展開されたアイコンを返します。- オーバーライド:
getExpandedIcon
、クラス:BasicTreeUI
- 戻り値:
- 展開されたアイコン
-
installDefaults
protected void installDefaults()
デフォルトのプロパティをインストールします。- オーバーライド:
installDefaults
、クラス:BasicTreeUI
-
installListeners
protected void installListeners()
リスナーを登録します。- オーバーライド:
installListeners
、クラス:BasicTreeUI
-
getContext
public SynthContext getContext(JComponent c)
指定されたコンポーネントのコンテキストを返します。- 定義:
getContext
、インタフェース:SynthUI
- パラメータ:
c
- SynthContextを要求するコンポーネント。- 戻り値:
- コンポーネントを記述するSynthContext。
-
createDefaultCellEditor
protected TreeCellEditor createDefaultCellEditor()
デフォルトのセル・エディタを作成します。- オーバーライド:
createDefaultCellEditor
、クラス:BasicTreeUI
- 戻り値:
- デフォルトのセル・エディタ
-
createDefaultCellRenderer
protected TreeCellRenderer createDefaultCellRenderer()
各ノードをスタンプするために使われるデフォルトのセル・レンダラを返します。- オーバーライド:
createDefaultCellRenderer
、クラス:BasicTreeUI
- 戻り値:
TreeCellRenderer
のインスタンス
-
uninstallDefaults
protected void uninstallDefaults()
既定のプロパティをアンインストールします。- オーバーライド:
uninstallDefaults
、クラス:BasicTreeUI
-
uninstallListeners
protected void uninstallListeners()
リスナーを登録解除します。- オーバーライド:
uninstallListeners
、クラス:BasicTreeUI
-
update
public void update(Graphics g, JComponent c)
このUI委譲に、指定されたコンポーネントを再ペイントするよう通知します。 このメソッドはコンポーネントのバックグラウンドをペイントし、paint(SynthContext,Graphics)
メソッドを呼び出します。一般に、このメソッドはサブクラスによってオーバーライドする必要はありません。 すべてのLook & Feelの描画コードを
paint
メソッドに入れるようにしてください。- オーバーライド:
update
、クラス:ComponentUI
- パラメータ:
g
- ペイントに使用されるGraphics
オブジェクトc
- ペイントされるコンポーネント- 関連項目:
paint(SynthContext,Graphics)
-
paintBorder
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
- ボーダーの高さ
-
paint
public void paint(Graphics g, JComponent c)
Look & Feelに従って、指定されたコンポーネントをペイントします。このメソッドは、Synth Look & Feelで使用されません。 ペイントは
paint(SynthContext,Graphics)
メソッドによって処理されます。- オーバーライド:
paint
、クラス:BasicTreeUI
- パラメータ:
g
- ペイントに使用されるGraphics
オブジェクトc
- ペイントされるコンポーネント- 関連項目:
paint(SynthContext,Graphics)
-
paint
protected void paint(SynthContext context, Graphics g)
指定されたコンポーネントをペイントします。- パラメータ:
context
- ペイントされるコンポーネントのコンテキストg
- ペイントに使用されるGraphics
オブジェクト- 関連項目:
update(Graphics,JComponent)
-
paintHorizontalPartOfLeg
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
- パラメータ:
g
- グラフィック・スコンテキストclipBounds
- クリップされた矩形insets
- insetsbounds
- 外接する矩形path
- ツリー・パスrow
- 行isExpanded
- パスが展開されている場合はtrue
hasBeenExpanded
- パスが展開されている場合はtrue
isLeaf
- パスがリーフの場合はtrue
-
paintHorizontalLine
protected void paintHorizontalLine(Graphics g, JComponent c, int y, int left, int right)
水平線をペイントします。- オーバーライド:
paintHorizontalLine
、クラス:BasicTreeUI
- パラメータ:
g
- グラフィック・スコンテキストc
- コンポーネントy
- Y座標left
- X1座標right
- X2座標
-
paintVerticalPartOfLeg
protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path)
脚の垂直部分をペイントします。 レシーバは、clipBounds
やinsets
を変更しないようにしてください。- オーバーライド:
paintVerticalPartOfLeg
、クラス:BasicTreeUI
- パラメータ:
g
- グラフィック・スコンテキストclipBounds
- クリップされた矩形insets
- insetspath
- ツリー・パス
-
paintVerticalLine
protected void paintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom)
垂直線をペイントします。- オーバーライド:
paintVerticalLine
、クラス:BasicTreeUI
- パラメータ:
g
- グラフィック・スコンテキストc
- コンポーネントx
- X座標top
- Y1座標bottom
- Y2座標
-
paintExpandControl
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
- パラメータ:
g
- グラフィック・スコンテキストclipBounds
- クリップされた矩形insets
- insetsbounds
- 外接する矩形path
- ツリー・パスrow
- 行isExpanded
- パスが展開されている場合はtrue
hasBeenExpanded
- パスが展開されている場合はtrue
isLeaf
- 行がリーフの場合はtrue
-
drawCentered
protected void drawCentered(Component c, Graphics graphics, Icon icon, int x, int y)
(x,y)を中心とするicon
を描画します。- オーバーライド:
drawCentered
、クラス:BasicTreeUI
- パラメータ:
c
- コンポーネントgraphics
- グラフィック・スコンテキストicon
- アイコンx
- X座標y
- Y座標
-
propertyChange
public void propertyChange(PropertyChangeEvent event)
バウンド・プロパティの変更時に呼び出されます。- 定義:
propertyChange
、インタフェース:PropertyChangeListener
- パラメータ:
event
- イベント・ソースと変更されたプロパティを記述するPropertyChangeEventオブジェクト。
-
paintDropLine
protected void paintDropLine(Graphics g)
ドロップ・ラインをペイントします。- オーバーライド:
paintDropLine
、クラス:BasicTreeUI
- パラメータ:
g
- 描画するGraphics
オブジェクト
-
getRowX
protected int getRowX(int row, int depth)
x軸に沿って特定の行をレンダリングする位置を返します。 戻り値には、JTreeで指定されたイン・セット値は一切含まれません。 このメソッドでは、行または深さの有効性は確認しないため、行または深さがツリーのそれと一致しない場合でも、正しいと見なされて、例外をスローしません。- オーバーライド:
getRowX
、クラス:BasicTreeUI
- パラメータ:
row
- x位置を返す行depth
- 行の深さ- 戻り値:
- 指定された行をインデントする量。
-
-