On Tuesday, February 14, 2017 at 4:20:11 PM UTC+1, Jonathan Cook wrote: > > Hello, > > I wanted to know the best way of taking a list of images which come from > an HTTP request, each image then needs to be retrieved. > > I would then like to use the images to make an animation behaviour so it > looks like the list of images is for example is an animated gif. Moving > between each image using a configurable time period. > > This needs to be done using GWT. I saw that you can create a custom > animation by using extends Animation: > http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwAnimation > > I also saw AbstractImagePrototype but I'm not sure what to use, also > exists AnimationScheduler. > > I made a simple example with javascript using setInterval but its not > clear in GWT how this should be done. >
Use a com.google.gwt.user.client.Timer, or com.google.gwt.core.client.Scheduler. Don't overdesign/overengineer using animations. Also, just like in pure JS, you can swap in Image widgets or ImageElement elements, or update their 'src'. -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
