public class SynthListUI extends BasicListUI implements PropertyChangeListener, SynthUI
JList。
BasicListUI.FocusHandler, BasicListUI.ListDataHandler, BasicListUI.ListSelectionHandler, BasicListUI.MouseInputHandler, BasicListUI.PropertyChangeHandlercellHeight, cellHeights, cellRendererChanged, cellWidth, fixedCellHeightChanged, fixedCellWidthChanged, focusListener, fontChanged, list, listDataListener, listSelectionListener, modelChanged, mouseInputListener, propertyChangeListener, prototypeCellValueChanged, rendererPane, selectionModelChanged, updateLayoutStateNeededDEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED| Constructor and Description |
|---|
SynthListUI() |
| Modifier and Type | Method and Description |
|---|---|
static ComponentUI |
createUI(JComponent list)
为给定组件创建一个新的用户界面对象。
|
SynthContext |
getContext(JComponent c)
返回指定组件的上下文。
|
protected void |
installDefaults()
初始化列表属性如字体、前景和背景,并添加cellrendererpane。
|
protected void |
installListeners()
创建并安装听众对于JList,其模型和选择模型。
|
void |
paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
油漆边界。
|
void |
propertyChange(PropertyChangeEvent e)
当改变绑定属性时,这种方法会被调用。
|
protected void |
uninstallDefaults()
设置列表属性未显式重写到
null。
|
protected void |
uninstallListeners()
消除听众从JList,其模型和选择模型。
|
void |
update(Graphics g, JComponent c)
通知这个UI代理重新绘制指定的组件。
|
convertRowToY, convertYToRow, createFocusListener, createListDataListener, createListSelectionListener, createMouseInputListener, createPropertyChangeListener, getBaseline, getBaselineResizeBehavior, getCellBounds, getPreferredSize, getRowHeight, indexToLocation, installKeyboardActions, installUI, locationToIndex, maybeUpdateLayoutState, paint, paintCell, selectNextIndex, selectPreviousIndex, uninstallKeyboardActions, uninstallUI, updateLayoutStatecontains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSizepublic static ComponentUI createUI(JComponent list)
list -组件创建UI对象
public void update(Graphics g, JComponent c)
BasicListUI.paint(java.awt.Graphics, javax.swing.JComponent)方法。
在一般情况下,该方法不需要由子类重写。所有的外观和感觉的渲染代码应该在paint方法。
update 方法重写,继承类
ComponentUI
g用于绘画的
Graphics对象
c被画的成分
BasicListUI.paint(java.awt.Graphics, javax.swing.JComponent)
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的身高
protected void installListeners()
public void propertyChange(PropertyChangeEvent e)
propertyChange 接口
PropertyChangeListener
e - PropertyChangeEvent对象描述事件源和性质已经改变。
protected void uninstallListeners()
protected void installDefaults()
protected void uninstallDefaults()
null。属性是重写如果其当前值不是一个
UIResource。
public SynthContext getContext(JComponent c)
getContext 接口
SynthUI
c组件请求synthcontext。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.