I am working on JFace Tableviewer
. I am bit confused in the usage of ColumnLabelProvider
and ITableLabelProvider
. I am trying to color certain row in the tableviewer(which has 1 column of string and checkbox images in the other 3 columns). I have implemented ITableLabelProvider
and colored the row but after that editing support is disabled. So I am confused whether should I use ColumnLabelProvider
or ITableLabelProvider
?
Can someone suggest me some ideas? Thanks in advance
ITableLabelProvider
uses one label provider to provide the labels for all the columns.
ColumnLabelProvider
uses a separate label provider for each column. It is intended to be used with TableViewerColumn
:
TableViewer viewer = new TableViewer(.....);
TableViewerColumn col1 = new TableViewerColumn(viewer, SWT.LEAD);
col1.setLabelProvider(column label provider for col 1);
col1.setEditingSupport(editing support for col 1);
... repeat for other columns