public class BasicTableUI extends TableUI
| Modifier and Type | Class and Description |
|---|---|
class |
BasicTableUI.FocusHandler
这个类应该被视为一个“受保护的”内部类。
|
class |
BasicTableUI.KeyHandler
这个类应该被视为一个“受保护的”内部类。
|
class |
BasicTableUI.MouseInputHandler
这个类应该被视为一个“受保护的”内部类。
|
| Modifier and Type | Field and Description |
|---|---|
protected FocusListener |
focusListener |
protected KeyListener |
keyListener |
protected MouseInputListener |
mouseInputListener |
protected CellRendererPane |
rendererPane |
protected JTable |
table |
| Constructor and Description |
|---|
BasicTableUI() |
| Modifier and Type | Method and Description |
|---|---|
protected FocusListener |
createFocusListener()
为表格处理键盘导航的焦点的倾听者。
|
protected KeyListener |
createKeyListener()
为表格处理键盘导航关键的听众。
|
protected MouseInputListener |
createMouseInputListener()
创建表格鼠标监听器。
|
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)
涂料的
table实例,是在installui()表示。
|
protected void |
uninstallDefaults() |
protected void |
uninstallKeyboardActions() |
protected void |
uninstallListeners() |
void |
uninstallUI(JComponent c)
逆转形态,完成指定的组件在
installUI。
|
contains, getAccessibleChild, getAccessibleChildrenCount, updateprotected JTable table
protected CellRendererPane rendererPane
protected KeyListener keyListener
protected FocusListener focusListener
protected MouseInputListener mouseInputListener
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变化适当。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()
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 Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
getBaselineResizeBehavior 方法重写,继承类
ComponentUI
c -
JComponent返回基线调整行为
null
c
NullPointerException
JComponent.getBaseline(int, int)
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)
public void paint(Graphics g, JComponent c)
table实例,是在installui()表示。
paint 方法重写,继承类
ComponentUI
g -
Graphics背景的画
c -正在绘制的构件;这种说法常常被忽视,但可能如果UI对象是无状态的,共享由多个组件
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
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.