|
JavaTM 2 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 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。