In GWT, how to create a Style object and associate it with a Widget WITHOUT using a CSS file and WITHOUT UiBinder
I would just like to create a Style object and associate it with a Widget, all in Java.
It is possible to create a Style object like that: Style style = new Style();
It is possible to link a Widget with a Style using: FlowPanel panel = new FlowPanel(); panel.setStyleName("myStyle");
But you need "myStyle" to exist in some CSS file.
It would be nice to be able to do: Style style = new Style("myStyle");
I would like to do everything in Java and avoid the CSS or UiBinder file.
Thank you !
You should be able to access the Style element by using
and then manipulate the style there.