Siddharth Koul
Siddharth Koul

Reputation: 15

Gradient color for cells in NatTable using Style() and not CSS

I'm trying to apply a gradient in my Row Header and Column Header in NatTable. In the NatTable examples I can see that a CSS file has been used to apply gradient color in DarkExample. However I'm more interested in applying it through org.eclipse.nebula.widgets.nattable.style.Style.

Foreground gradient : left to right Red to White

Background gradient : Top to bottom Blue to White

Corner gradient : Top to bottom Red to White

Is it possible?

Upvotes: 0

Views: 39

Answers (1)

Dirk Fauth
Dirk Fauth

Reputation: 4231

Everything that can be done via CSS can be done programmatically, as the CSS actually just forwards to the NatTable styling API.

That said, you can use the GradientBackgroundPainter. And this is also shown in the CellPainterExample.

Upvotes: 1

Related Questions