Anyone know if it's possible to enable/disable individual JFace TextCellEditor fields.
For instance if I have a table with 5 columns, I want the last cell to be empty unless field #4 is filled in.
Anyone know if it's possible to enable/disable individual JFace TextCellEditor fields.
For instance if I have a table with 5 columns, I want the last cell to be empty unless field #4 is filled in.
If you're using the EditingSupport class, you can set canEdit
to return true.
TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
EditingSupport editingSupport = new EditingSupport(viewer)
{
... implement abstract methods ...
protected boolean canEdit(Object element)
{
return (/* criteria to determine if this column is editable*/)
}
};
column.setEditingSupport(editingSupport);