public class BasicTableHeaderUI extends TableHeaderUI
Modifier and Type | Class and Description |
---|---|
class |
BasicTableHeaderUI.MouseInputHandler
这个类应该被视为一个“受保护的”内部类。
|
Modifier and Type | Field and Description |
---|---|
protected JTableHeader |
header
是的jtableheader下放画这个UI。
|
protected MouseInputListener |
mouseInputListener |
protected CellRendererPane |
rendererPane |
Constructor and Description |
---|
BasicTableHeaderUI() |
Modifier and Type | Method and Description |
---|---|
protected MouseInputListener |
createMouseInputListener()
给JTableHeader的鼠标监听器。
|
static ComponentUI |
createUI(JComponent h) |
int |
getBaseline(JComponent c, int width, int height)
返回基线。
|
Dimension |
getMaximumSize(JComponent c)
返回头的最大大小。
|
Dimension |
getMinimumSize(JComponent c)
返回头的最小大小。
|
Dimension |
getPreferredSize(JComponent c)
返回头的首选大小。
|
protected int |
getRolloverColumn()
返回鼠标当前正在的列标题的索引。
|
protected void |
installDefaults()
Initializes JTableHeader属性,如字体,前景和背景。
|
protected void |
installKeyboardActions()
在jtableheader登记所有的键盘操作。
|
protected void |
installListeners()
重视听众的jtableheader。
|
void |
installUI(JComponent c)
配置指定的组件适当的外观和感觉。
|
void |
paint(Graphics g, JComponent c)
适当地绘制指定的组件的外观和感觉。
|
protected void |
rolloverColumnUpdated(int oldColumn, int newColumn)
当在表头中的一个滚动列被更新时,这种方法会被调用。
|
protected void |
uninstallDefaults() |
protected void |
uninstallKeyboardActions()
将默认的关键行动。
|
protected void |
uninstallListeners() |
void |
uninstallUI(JComponent c)
逆转形态,完成指定的组件在
installUI 。
|
contains, getAccessibleChild, getAccessibleChildrenCount, getBaselineResizeBehavior, update
protected JTableHeader header
protected CellRendererPane rendererPane
protected MouseInputListener mouseInputListener
protected MouseInputListener createMouseInputListener()
public static ComponentUI createUI(JComponent h)
public void installUI(JComponent c)
ComponentUI
ComponentUI
实例被安装在指定组件的UI代理。这种方法应该完全配置的组件外观和感觉,包括以下内容:
LayoutManager
组件上的必要。PropertyChangeListener
变化适当。installUI
方法重写,继承类
ComponentUI
c
-组件,UI代理被安装
ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
protected void installDefaults()
protected void installListeners()
protected void installKeyboardActions()
public void uninstallUI(JComponent c)
ComponentUI
installUI
。这个方法被调用时,这个
UIComponent
实例被作为指定组件的UI代理删除。这种方法应该撤消配置进行
installUI
,小心留下的
JComponent
实例在干净的状态(没有多余的听众,外观和感觉的特定属性的对象,等)。这应包括以下几个方面:
uninstallUI
方法重写,继承类
ComponentUI
c
-从这个UI代理被删除的组件;这种说法常常被忽视,但可能如果UI对象是无状态的,共享由多个组件
ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
protected void uninstallDefaults()
protected void uninstallListeners()
protected void uninstallKeyboardActions()
protected int getRolloverColumn()
rolloverColumnUpdated(int, int)
protected void rolloverColumnUpdated(int oldColumn, int newColumn)
oldColumn
-以前的侧翻柱或指数1如果鼠标不在列
newColumn
--新翻柱或指数1如果鼠标不在列
getRolloverColumn()
,
JTableHeader.getHeaderRect(int)
public int getBaseline(JComponent c, int width, int height)
getBaseline
方法重写,继承类
ComponentUI
c
-
JComponent
基线被要求
width
的宽度得到基线
height
-高度得到基线
null
c
NullPointerException
IllegalArgumentException
如果宽度或高度小于0
JComponent.getBaseline(int, int)
public void paint(Graphics g, JComponent c)
ComponentUI
ComponentUI.update
方法调用时指定的组件正在粉刷。子类应重写此方法,并使用指定的
Graphics
对象呈现的成分含量。
paint
方法重写,继承类
ComponentUI
g
-
Graphics
背景的画
c
-正在绘制的构件;这种说法常常被忽视,但可能如果UI对象是无状态的,共享由多个组件
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
public Dimension getMinimumSize(JComponent c)
getMinimumSize
方法重写,继承类
ComponentUI
c
最小尺寸的是被查询的成分;这种说法常常被忽视,但可能如果UI对象是无状态的,共享由多个组件
Dimension
对象或
null
JComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
public Dimension getPreferredSize(JComponent c)
getPreferredSize
方法重写,继承类
ComponentUI
c
优先度的被查询的成分;这种说法常常被忽视,但可能如果UI对象是无状态的,共享由多个组件
JComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension getMaximumSize(JComponent c)
getMaximumSize
方法重写,继承类
ComponentUI
c
-其最大尺寸被查询的成分;这种说法常常被忽视,但可能如果UI对象是无状态的,共享由多个组件
Dimension
对象或
null
JComponent.getMaximumSize()
,
LayoutManager2.maximumLayoutSize(java.awt.Container)
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.