I am using GWT. I have an Image Resource object. for example,
ImageResource image = ClientResources.of().images().icon();
How can I add some css styles on this image. Since this is ImageResource, not the Image object, I cannot use image.addStyleName(). I am not using ui-binder. So how could I achieve this?
Because I am newb in GWT, if you answer could provide some codes, that would be more clear and really appreciated.
Best Regards.
How are you displaying the image? You can't perform CSS operations on an
ImageResource
directly, but neither can you display it directly. You have to stick it in anImage
,ImageResourceCell
, or some other object, all of which are able to be styled. So you'd want to style the renderer, not theImageResource
itself.For example: