Hi! ,
I've created a Tableviewer and I have the class selectionView that init the
tableviewer and it 's components. I have another class GuiData that adds
element to my tableviewer.
Where can I call the refresh method (table_viewer.refresh) to update my
table_viewer?
Thanks.
Below is some code:
public class SelectionView extends ViewPart {
......
private Table table = null;
TableViewer table_viewer;
@Override
public void createPartControl(Composite parent) {
// TODO Auto-generated method stub
top = new Composite(parent, SWT.NONE);
top.setLayout(new GridLayout());
createToolBar();
createTable();
}
....
.....
private void createTable() {
GridData gridData1 = new GridData();
gridData1.grabExcessHorizontalSpace = true;
.....
table_viewer = new TableViewer(table);
table_viewer.setContentProvider(new DeviceContentProvider());
table_viewer.setLabelProvider(new DeviceLabelProvider());
DeviceSelectionFilter dsf = new DeviceSelectionFilter();
dsf.setWantedDevice(Device.TYPES.CELLPHONE);
table_viewer.addFilter(dsf);