public class SynthTableHeaderUI extends BasicTableHeaderUI implements PropertyChangeListener, SynthUI
JTableHeader
。
BasicTableHeaderUI.MouseInputHandler
header, mouseInputListener, rendererPane
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED
Constructor and Description |
---|
SynthTableHeaderUI() |
Modifier and Type | Method and Description |
---|---|
static ComponentUI |
createUI(JComponent h)
为给定组件创建一个新的用户界面对象。
|
SynthContext |
getContext(JComponent c)
返回指定组件的上下文。
|
protected void |
installDefaults()
Initializes JTableHeader属性,如字体,前景和背景。
|
protected void |
installListeners()
重视听众的jtableheader。
|
void |
paint(Graphics g, JComponent c)
根据外观和感觉绘制指定的组件。
|
protected void |
paint(SynthContext context, Graphics g)
绘制指定的组件。
|
void |
paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
油漆边界。
|
void |
propertyChange(PropertyChangeEvent evt)
当改变绑定属性时,这种方法会被调用。
|
protected void |
rolloverColumnUpdated(int oldColumn, int newColumn)
当在表头中的一个滚动列被更新时,这种方法会被调用。
|
protected void |
uninstallDefaults() |
protected void |
uninstallListeners() |
void |
update(Graphics g, JComponent c)
通知这个UI代理重新绘制指定的组件。
|
createMouseInputListener, getBaseline, getMaximumSize, getMinimumSize, getPreferredSize, getRolloverColumn, installKeyboardActions, installUI, uninstallKeyboardActions, uninstallUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaselineResizeBehavior
public static ComponentUI createUI(JComponent h)
h
-组件创建UI对象
protected void installDefaults()
protected void installListeners()
installListeners
方法重写,继承类
BasicTableHeaderUI
protected void uninstallDefaults()
uninstallDefaults
方法重写,继承类
BasicTableHeaderUI
protected void uninstallListeners()
uninstallListeners
方法重写,继承类
BasicTableHeaderUI
public void update(Graphics g, JComponent c)
paint(SynthContext,Graphics)
方法。
在一般情况下,该方法不需要由子类重写。所有的外观和感觉的渲染代码应该在paint
方法。
update
方法重写,继承类
ComponentUI
g
用于绘画的
Graphics
对象
c
被画的成分
paint(SynthContext,Graphics)
public void paint(Graphics g, JComponent c)
这种方法不使用Synth外观。绘画是由paint(SynthContext,Graphics)
方法处理。
paint
方法重写,继承类
BasicTableHeaderUI
g
用于绘画的
Graphics
对象
c
被画的成分
paint(SynthContext,Graphics)
protected void paint(SynthContext context, Graphics g)
context
-正在绘制的组件上下文
g
用于绘画的
Graphics
对象
update(Graphics,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
的身高
public SynthContext getContext(JComponent c)
getContext
接口
SynthUI
c
组件请求synthcontext。
protected void rolloverColumnUpdated(int oldColumn, int newColumn)
rolloverColumnUpdated
方法重写,继承类
BasicTableHeaderUI
oldColumn
-以前的侧翻柱或指数1如果鼠标不在列
newColumn
--新翻柱或指数1如果鼠标不在列
BasicTableHeaderUI.getRolloverColumn()
,
JTableHeader.getHeaderRect(int)
public void propertyChange(PropertyChangeEvent evt)
propertyChange
接口
PropertyChangeListener
evt
- PropertyChangeEvent对象描述事件源和性质已经改变。
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.