use of javax.swing.table.TableCellEditor in project processdash by dtuma.
the class ProxyJTable method getCellEditor.
@Override
public TableCellEditor getCellEditor(int row, int column) {
DataColumn dc = ((ProxyDataModel) getModel()).getColumn(column);
if (dc instanceof ProxySizeColumn) {
ProxySizeColumn psc = (ProxySizeColumn) dc;
TableCellEditor result = psc.getCellEditorForRow(row);
if (result != null)
return result;
}
return super.getCellEditor(row, column);
}
use of javax.swing.table.TableCellEditor in project processdash by dtuma.
the class DataJTable method editingStopped.
@Override
public void editingStopped(ChangeEvent e) {
// check to see if the value in this cell actually changed.
boolean valueChanged = false;
String columnName = null;
TableCellEditor editor = getCellEditor();
if (editor != null) {
Object valueAfterEditing = editor.getCellEditorValue();
valueChanged = !equal(valueBeforeEditing, valueAfterEditing);
columnName = getColumnName(getEditingColumn());
}
// stop the editing session
super.editingStopped(e);
// if the value was changed, notify the UndoList.
if (valueChanged)
UndoList.madeChange(DataJTable.this, "Editing value in '" + columnName + "' column");
}
Aggregations