Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is difference between ColumnLabelProvider and ITableLabelProvider in Jface tableviewer?

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

like image 503
Acjb Avatar asked Dec 13 '25 17:12

Acjb


1 Answers

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
like image 63
greg-449 Avatar answered Dec 15 '25 09:12

greg-449



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!