On Thursday, December 27, 2012 2:52:46 PM UTC+1, membersound wrote:
>
> I know how to use images in general with uibinder, like:
>
> .ui.xml:
> <g:Image resource='{res.image}' />
>
> .java:
> public interface Resources extends ClientBundle {
>     @Source("image.png")
>     @ImageOptions(repeatStyle = RepeatStyle.None)
>     ImageResource image();
> }
>
> But in case of static images, how can I use the same image in the same 
> way, but without having to write any java code? Just using uibinder?
>

Each UiBinder template defines an implicit ClientBundle. You can declare a 
CssResource using <ui:style>, a DataResource with <ui:data> and an 
ImageResource with <ui:image>:

<ui:image field="image" src="image.png" repeatStyle="None"/> (there's also 
a flipRtl="true" attribute; and just like the @Source is optional, src="" 
is optional too)
 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/1epAhJyDBPkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to