I would like to obtain a CSS-like string from code and add it to the current widget style.
SmartGWT have a setStyleName attribute, which work with CSS present on the stylesheet only, but no set Style or anything similar I can think of. How can I achieve this?
If I understand your question correctly, you should be able to use
{widget}.getElement().getStyle()to obtain acom.google.gwt.dom.client.Styleobject that you can manipulate. But you need to give it individual “parsed” CSS properties.If you just have a chunk of CSS as a string you can add it to your document with
com.google.gwt.dom.user.StyleInjector, then add the needed classes to the widgets that need them.