How can I style a NatTable using CSS?
This page shows a snippet that should explain how to use CSS for Nattables.
To create a CSS style definition, the general selector NatTable can be used. Additionally a class or id based selector can be used. For example you can create a class based style definition
.basic {
cell-background-color: white;
text-align: left;
}
And then configure that class for a NatTable instance via setData().
natTable.setData(CSSSWTConstants.CSS_CLASS_NAME_KEY, "basic");
But it's unclear how to tell the NatTable (or eclipse) where to look for that CSS file.
NatTable CSS styling is based on Eclipse 4 CSS styling. For details on Eclipse 4 CSS styling have a look at corresponding tutorials like
https://www.vogella.com/tutorials/Eclipse4CSS/article.html https://wiki.eclipse.org/Eclipse4/RCP/CSS