java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ListUI
javax.swing.plaf.basic.BasicListUI
javax.swing.plaf.synth.SynthListUI
- 所有已实现的接口:
-
PropertyChangeListener,EventListener,SynthConstants,SynthUI
为
JList提供Synth外观UI代理。
- 自版本:
- 1.7
-
Nested Class Summary
Nested classes/interfaces declared in class javax.swing.plaf.basic.BasicListUI
BasicListUI.FocusHandler, BasicListUI.ListDataHandler, BasicListUI.ListSelectionHandler, BasicListUI.MouseInputHandler, BasicListUI.PropertyChangeHandler -
Field Summary
Fields declared in class javax.swing.plaf.basic.BasicListUI
cellHeight, cellHeights, cellRendererChanged, cellWidth, fixedCellHeightChanged, fixedCellWidthChanged, focusListener, fontChanged, list, listDataListener, listSelectionListener, modelChanged, mouseInputListener, propertyChangeListener, prototypeCellValueChanged, rendererPane, selectionModelChanged, updateLayoutStateNeededFields declared in interface javax.swing.plaf.synth.SynthConstants
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentUIcreateUI(JComponent list) 为给定的组件创建一个新的UI对象。返回指定组件的上下文。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.BasicListUI
convertRowToY, convertYToRow, createFocusListener, createListDataListener, createListSelectionListener, createMouseInputListener, createPropertyChangeListener, getBaseline, getBaselineResizeBehavior, getCellBounds, getPreferredSize, getRowHeight, indexToLocation, installDefaults, installKeyboardActions, installListeners, installUI, locationToIndex, maybeUpdateLayoutState, paint, paintCell, selectNextIndex, selectPreviousIndex, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, updateLayoutStateMethods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize
-
Constructor Details
-
SynthListUI
public SynthListUI()构造一个SynthListUI。
-
-
Method Details
-
createUI
为给定的组件创建一个新的UI对象。- 参数:
-
list- 要为其创建UI对象的组件 - 返回:
- UI对象
-
update
通知此UI代理重新绘制指定的组件。此方法绘制组件背景,然后调用BasicListUI.paint(java.awt.Graphics, javax.swing.JComponent)方法。一般来说,子类不需要覆盖此方法。所有外观渲染代码应位于
paint方法中。- 覆盖:
-
update在类ComponentUI中 - 参数:
-
g- 用于绘制的Graphics对象 -
c- 正在绘制的组件 - 参见:
-
paintBorder
绘制边框。- 指定者:
-
paintBorder在接口SynthUI中 - 参数:
-
context- 组件上下文 -
g- 要绘制的Graphics -
x- X坐标 -
y- Y坐标 -
w- 边框宽度 -
h- 边框高度
-
propertyChange
当绑定属性更改时调用此方法。- 指定者:
-
propertyChange在接口PropertyChangeListener中 - 参数:
-
e- 描述事件源和已更改属性的PropertyChangeEvent对象
-
getContext
返回指定组件的上下文。- 指定者:
-
getContext在接口SynthUI中 - 参数:
-
c- 请求SynthContext的组件 - 返回:
- 描述组件的SynthContext
-