本文整理汇总了Java中javax.swing.table.TableCellEditor.getCellEditorValue方法的典型用法代码示例。如果您正苦于以下问题:Java TableCellEditor.getCellEditorValue方法的具体用法?Java TableCellEditor.getCellEditorValue怎么用?Java TableCellEditor.getCellEditorValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.table.TableCellEditor
的用法示例。
在下文中一共展示了TableCellEditor.getCellEditorValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: editingStopped
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
public void editingStopped(ChangeEvent e) {
synchronized(mutex) {
if (recursion) return;
recursion = true;
}
try {
// Take in the new value
TableCellEditor editor = getCellEditor();
if (editor != null) {
editor.stopCellEditing();
Object value = editor.getCellEditorValue();
setValueAt(value, editingRow, editingColumn);
removeEditor();
}
} finally {
recursion = false;
}
}
示例2: getCellEditorValue
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
@Override
public Object getCellEditorValue() {
if (currentEditor != null) {
return currentEditor.getCellEditorValue();
}
if (canceledEditorRef != null) {
TableCellEditor canceledEditor = canceledEditorRef.get();
if (canceledEditor != null) {
return canceledEditor.getCellEditorValue();
}
}
Exceptions.printStackTrace(new IllegalStateException("No current editor."));
return null;
}
示例3: editingStopped
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
@Override
public void editingStopped(ChangeEvent e) {
TableCellEditor editor = getCellEditor();
if (editor != null) {
Object value = editor.getCellEditorValue();
int index = getEditingColumn();
columnModel.getColumn(index).setHeaderValue(value);
removeEditor();
}
}
示例4: editingCanceled
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
@Override
public void editingCanceled(ChangeEvent e) {
TableCellEditor editor = getCellEditor();
if (editor != null) {
editor.stopCellEditing();
Object value = editor.getCellEditorValue();
setValueAt(value, editingRow, editingColumn);
removeEditor();
}
}