I'm developing an eclipse RCP/RAP application. I have several GUI-classes that use the JFace TableViewer (internal org.eclipse.swt.widgets.Table). Some of my clients mentioned that it is a little confusing wether the "database-select failed" or there are just no elements.
So here's my question. Is there any way to display a "greyed out" text saying "No elements". There is something similar for the org.eclipse.swt.widgets.Text:
edtTest.setMessage("Please enter something");
Couldn't find anything like that.
Thank you in advance.
There isn't any simple support for this.
You could simulate this by adding a dummy row to the table and making your label provider implement
IColorProviderso you can set the color of the row (or use one of the label providers based onStyledCellLabelProvider.Alternatively use a separate label control and use
StackLayoutto make either the table of the label the visible control.