Reputation: 23
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 !
Upvotes: 0
Views: 387
Reputation: 1903
You should be able to access the Style element by using
someUiObject.getElement().getStyle()
and then manipulate the style there.
Upvotes: 2