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
为
JTree提供Synth L&F UI代理。
- 自从:
- 1.7
-
Nested Class Summary
Nested classes/interfaces declared in class 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 -
Field Summary
Fields declared in class 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, validCachedPreferredSizeFields declared in interface javax.swing.plaf.synth.SynthConstants
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentUI为给定的组件创建一个新的UI对象。返回指定组件的上下文。voidpaint(Graphics g, JComponent c) 根据外观和感觉绘制指定的组件。protected voidpaint(SynthContext context, Graphics g) 绘制指定的组件。voidpaintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) 绘制边框。void当绑定属性更改时调用此方法。voidupdate(Graphics g, JComponent c) 通知此UI代理重新绘制指定的组件。Methods declared in class 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, updateSizeMethods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, installUI, uninstallUI
-
Constructor Details
-
SynthTreeUI
public SynthTreeUI()构造一个SynthTreeUI。
-
-
Method Details
-
createUI
为给定的组件创建一个新的UI对象。- 参数:
-
x- 要为其创建UI对象的组件 - 返回:
- UI对象
-
getContext
返回指定组件的上下文。- 指定者:
-
getContext在接口SynthUI - 参数:
-
c- 请求SynthContext的组件。 - 返回:
- 描述组件的SynthContext。
-
update
通知此UI代理重新绘制指定的组件。此方法绘制组件背景,然后调用paint(SynthContext,Graphics)方法。一般来说,子类不需要覆盖此方法。所有外观和感觉渲染代码应该驻留在
paint方法中。- 覆盖:
-
update在类ComponentUI - 参数:
-
g- 用于绘制的Graphics对象 -
c- 正在绘制的组件 - 参见:
-
paintBorder
绘制边框。- 指定者:
-
paintBorder在接口SynthUI - 参数:
-
context- 组件上下文 -
g- 要绘制的Graphics -
x- X坐标 -
y- Y坐标 -
w- 边框的宽度 -
h- 边框的高度
-
paint
根据外观和感觉绘制指定的组件。此方法不被Synth外观和感觉使用。绘制由
paint(SynthContext,Graphics)方法处理。- 覆盖:
-
paint在类ComponentUI - 参数:
-
g- 用于绘制的Graphics对象 -
c- 正在绘制的组件 - 参见:
-
paint
绘制指定的组件。- 参数:
-
context- 正在绘制的组件的上下文 -
g- 用于绘制的Graphics对象 - 参见:
-
propertyChange
当绑定属性更改时调用此方法。- 指定者:
-
propertyChange在接口PropertyChangeListener - 参数:
-
event- 描述事件源和已更改属性的PropertyChangeEvent对象。
-