public interface TableCellEditor extends CellEditor
JListBox
,
JComboBox
,
JTree
值编辑器,或
JTable
需要实现。
Modifier and Type | Method and Description |
---|---|
Component |
getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
设置初始
value 编辑。
|
addCellEditorListener, cancelCellEditing, getCellEditorValue, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
value
编辑。这将导致编辑器
stopEditing
失去价值如果任何部分编辑编辑编辑时调用此方法。
还应增加客户的Component
层次组件。一旦安装在客户端的层次结构中,这个组件将能够绘制和接收用户输入。
table
-
JTable
,要求编辑器编辑;可以
null
value
-细胞要编辑的价值;它是由特定的编辑器来解释和画的价值。例如,如果值是字符串“真”,它可以被渲染为一个字符串,或者它可以被渲染为一个检查框。
null
是一个有效值
isSelected
-如果细胞变得突出
row
-正在编辑的单元格的行
column
-正在编辑的单元格的列
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.