|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.TableUI
javax.swing.plaf.basic.BasicTableUI
public class BasicTableUI
BasicTableUI 实现
| 嵌套类摘要 | |
|---|---|
class |
BasicTableUI.FocusHandler
此内部类因编译器故障而被标记为“公开”。 |
class |
BasicTableUI.KeyHandler
此内部类因编译器故障而被标记为“公开”。 |
class |
BasicTableUI.MouseInputHandler
此内部类因编译器故障而被标记为“公开”。 |
| 字段摘要 | |
|---|---|
protected FocusListener |
focusListener
|
protected KeyListener |
keyListener
|
protected MouseInputListener |
mouseInputListener
|
protected CellRendererPane |
rendererPane
|
protected JTable |
table
|
| 构造方法摘要 | |
|---|---|
BasicTableUI()
|
|
| 方法摘要 | |
|---|---|
protected FocusListener |
createFocusListener()
创建在 JTable 中处理键盘导航的焦点侦听器。 |
protected KeyListener |
createKeyListener()
创建在 JTable 中处理键盘导航的键侦听器。 |
protected MouseInputListener |
createMouseInputListener()
创建 JTable 的鼠标侦听器。 |
static ComponentUI |
createUI(JComponent c)
|
int |
getBaseline(JComponent c,
int width,
int height)
返回基线。 |
Component.BaselineResizeBehavior |
getBaselineResizeBehavior(JComponent c)
返回指示该组件的基线如何随大小的改变而发生更改的枚举。 |
Dimension |
getMaximumSize(JComponent c)
返回表的最大大小。 |
Dimension |
getMinimumSize(JComponent c)
返回表的最小大小。 |
Dimension |
getPreferredSize(JComponent c)
返回表的首选大小。 |
protected void |
installDefaults()
初始化 JTable 属性,例如,字体、前景和背景。 |
protected void |
installKeyboardActions()
在 JTable 上注册所有的键盘动作。 |
protected void |
installListeners()
将侦听器附加到 JTable 上。 |
void |
installUI(JComponent c)
配置指定组件,使其适合外观。 |
void |
paint(Graphics g,
JComponent c)
绘制用 installUI() 设置的 table 实例的表示形式。 |
protected void |
uninstallDefaults()
|
protected void |
uninstallKeyboardActions()
|
protected void |
uninstallListeners()
|
void |
uninstallUI(JComponent c)
在 installUI 期间,在指定组件上反向执行的配置操作。 |
| 从类 javax.swing.plaf.ComponentUI 继承的方法 |
|---|
contains, getAccessibleChild, getAccessibleChildrenCount, update |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected JTable table
protected CellRendererPane rendererPane
protected KeyListener keyListener
protected FocusListener focusListener
protected MouseInputListener mouseInputListener
| 构造方法详细信息 |
|---|
public BasicTableUI()
| 方法详细信息 |
|---|
protected KeyListener createKeyListener()
protected FocusListener createFocusListener()
protected MouseInputListener createMouseInputListener()
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
ComponentUI 复制的描述ComponentUI 实例将作为 UI 委托安装在指定组件上时,可调用此方法。此方法应该为外观完整地配置组件,包括以下方面:
LayoutManager。
PropertyChangeListener。
ComponentUI 中的 installUIc - 将安装此 UI 委托的组件ComponentUI.uninstallUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()protected void installDefaults()
installUI(javax.swing.JComponent)protected void installListeners()
protected void installKeyboardActions()
public void uninstallUI(JComponent c)
ComponentUI 复制的描述installUI 期间,在指定组件上反向执行的配置操作。当此 UIComponent 实例将作为 UI 委托从指定组件上移除时,可调用此方法。此方法应该取消在 installUI 中执行的配置操作,非常小心地使 JComponent 实例处于某种洁净状态(没有额外的侦听器、没有特定于外观的属性对象等等)。配置内容应该包括以下方面:
ComponentUI 中的 uninstallUIc - 从中移除此 UI 委托的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数ComponentUI.installUI(javax.swing.JComponent),
JComponent.updateUI()protected void uninstallDefaults()
protected void uninstallListeners()
protected void uninstallKeyboardActions()
public int getBaseline(JComponent c,
int width,
int height)
ComponentUI 中的 getBaselinec - 为其请求基线的 JComponentwidth - 为其获取基线的宽度height - 为其获取基线的高度
NullPointerException - 如果 c 为 null
IllegalArgumentException - 如果宽度或高度 < 0JComponent.getBaseline(int, int)public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
ComponentUI 中的 getBaselineResizeBehaviorc - 为其返回调整大小行为的 JComponent
NullPointerException - 如果 c 为 nullJComponent.getBaseline(int, int)public Dimension getMinimumSize(JComponent c)
ComponentUI 中的 getMinimumSizec - 将查询其最小大小的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数
Dimension 对象或 nullJComponent.getMinimumSize(),
LayoutManager.minimumLayoutSize(java.awt.Container),
ComponentUI.getPreferredSize(javax.swing.JComponent)public Dimension getPreferredSize(JComponent c)
ComponentUI 中的 getPreferredSizec - 将查询其首选大小的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数JComponent.getPreferredSize(),
LayoutManager.preferredLayoutSize(java.awt.Container)public Dimension getMaximumSize(JComponent c)
ComponentUI 中的 getMaximumSizec - 将查询其最大大小的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数
Dimension 对象或 nullJComponent.getMaximumSize(),
LayoutManager2.maximumLayoutSize(java.awt.Container)
public void paint(Graphics g,
JComponent c)
table 实例的表示形式。
ComponentUI 中的 paintg - 将在其中进行绘制的 Graphics 上下文c - 将绘制的组件;此参数常被忽略,但如果 UI 对象是无状态的并由多个组件共享,则可以使用该参数ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。