|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjavax.swing.AbstractCellEditor
javax.swing.DefaultCellEditor
public class DefaultCellEditor
表單元格和階層樹單元格的預設編輯器。
警告:此類別的序列化物件將與以後的 Swing 版本不相容。當前的序列化支持適用於短期存儲或運行相同 Swing 版本的應用程序之間的 RMI。從 1.4 版本開始,已在 java.beans 套件中添加了支持所有 JavaBeansTM 長期存儲的功能。請參見 XMLEncoder。
| 巢狀類別摘要 | |
|---|---|
protected class |
DefaultCellEditor.EditorDelegate
受保護的 (protected) EditorDelegate 類別。 |
| 欄位摘要 | |
|---|---|
protected int |
clickCountToStart
指定開始編輯所需單擊次數的整數。 |
protected DefaultCellEditor.EditorDelegate |
delegate
處理從 CellEditor 發送的所有方法的委託類別。 |
protected JComponent |
editorComponent
正被編輯的 Swing 元件。 |
| 從類別 javax.swing.AbstractCellEditor 繼承的欄位 |
|---|
changeEvent, listenerList |
| 建構子摘要 | |
|---|---|
DefaultCellEditor(JCheckBox checkBox)
建構一個使用複選框的 DefaultCellEditor 物件。 |
|
DefaultCellEditor(JComboBox comboBox)
建構一個使用組合框的 DefaultCellEditor 物件。 |
|
DefaultCellEditor(JTextField textField)
建構一個使用文本欄位的 DefaultCellEditor。 |
|
| 方法摘要 | |
|---|---|
void |
cancelCellEditing()
將訊息從 CellEditor 轉發到 delegate。 |
Object |
getCellEditorValue()
將訊息從 CellEditor 轉發到 delegate。 |
int |
getClickCountToStart()
返回開始編輯所需的單擊次數。 |
Component |
getComponent()
返回對編輯器元件的參考。 |
Component |
getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
實作 TableCellEditor 介面。 |
Component |
getTreeCellEditorComponent(JTree tree,
Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
實作 TreeCellEditor 介面。 |
boolean |
isCellEditable(EventObject anEvent)
將訊息從 CellEditor 轉發到 delegate。 |
void |
setClickCountToStart(int count)
指定開始編輯所需的單擊次數。 |
boolean |
shouldSelectCell(EventObject anEvent)
將訊息從 CellEditor 轉發到 delegate。 |
boolean |
stopCellEditing()
將訊息從 CellEditor 轉發到 delegate。 |
| 從類別 javax.swing.AbstractCellEditor 繼承的方法 |
|---|
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 從介面 javax.swing.CellEditor 繼承的方法 |
|---|
addCellEditorListener, removeCellEditorListener |
| 欄位詳細資訊 |
|---|
protected JComponent editorComponent
protected DefaultCellEditor.EditorDelegate delegate
CellEditor 發送的所有方法的委託類別。
protected int clickCountToStart
clickCountToStart 定義為零,也只有在發生單擊後才能啟動它。
| 建構子詳細資訊 |
|---|
public DefaultCellEditor(JTextField textField)
DefaultCellEditor。
textField - 一個 JTextField 物件public DefaultCellEditor(JCheckBox checkBox)
DefaultCellEditor 物件。
checkBox - 一個 JCheckBox 物件public DefaultCellEditor(JComboBox comboBox)
DefaultCellEditor 物件。
comboBox - 一個 JComboBox 物件| 方法詳細資訊 |
|---|
public Component getComponent()
Componentpublic void setClickCountToStart(int count)
count - 指定開始編輯所需的單擊次數的 int 值getClickCountToStart()public int getClickCountToStart()
public Object getCellEditorValue()
CellEditor 轉發到 delegate。
CellEditor 中的 getCellEditorValueDefaultCellEditor.EditorDelegate.getCellEditorValue()public boolean isCellEditable(EventObject anEvent)
CellEditor 轉發到 delegate。
CellEditor 中的 isCellEditableAbstractCellEditor 中的 isCellEditableanEvent - 一個事件物件
DefaultCellEditor.EditorDelegate.isCellEditable(EventObject)public boolean shouldSelectCell(EventObject anEvent)
CellEditor 轉發到 delegate。
CellEditor 中的 shouldSelectCellAbstractCellEditor 中的 shouldSelectCellanEvent - 一個事件物件
DefaultCellEditor.EditorDelegate.shouldSelectCell(EventObject)public boolean stopCellEditing()
CellEditor 轉發到 delegate。
CellEditor 中的 stopCellEditingAbstractCellEditor 中的 stopCellEditingDefaultCellEditor.EditorDelegate.stopCellEditing()public void cancelCellEditing()
CellEditor 轉發到 delegate。
CellEditor 中的 cancelCellEditingAbstractCellEditor 中的 cancelCellEditingDefaultCellEditor.EditorDelegate.cancelCellEditing()
public Component getTreeCellEditorComponent(JTree tree,
Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
TreeCellEditor 介面。
TreeCellEditor 中的 getTreeCellEditorComponenttree - 要請求編輯器進行編輯的 JTree;此參數可以為 nullvalue - 要編輯的單元格的值isSelected - 如果將呈現單元格並在選擇時高亮顯示,則為 trueexpanded - 如果該節點被擴展,則為 trueleaf - 如果該節點是葉節點,則為 truerow - 正在編輯的節點的行索引
public Component getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
TableCellEditor 介面。
TableCellEditor 中的 getTableCellEditorComponenttable - 要求編輯器進行編輯的 JTable;可以為 nullvalue - 要編輯的單元格的值;由具體的編輯器解釋和繪製該值。例如,如果 value 是字元串 "true",則它可呈現為字元串,或者也可作為已選中的複選框來呈現。null 是有效值isSelected - 如果使用高亮顯示來呈現該單元格,則為 truerow - 要編輯的單元格所在行column - 要編輯的單元格所在列
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。