Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8021911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:07:17+00:00 2026-06-04T22:07:17+00:00

I’m setting out to create a weather model display tool (web application), and from

  • 0

I’m setting out to create a weather model display tool (web application), and from what I’ve seen, I’m really liking the idea of using Google Web Tools, and especially the SmartGWT toolkit. My one biggest sticking point at this point is finding some way to create a sort of image “looper” (displaying all images in a particular “set” one after another, not unlike a slide show). For reference, I need functionality (at least on a basic level) similar to this: http://rapidrefresh.noaa.gov/hrrrconus/jsloop.cgi?dsKeys=hrrr:&runTime=2012053007&plotName=cref_sfc&fcstInc=60&numFcsts=16&model=hrrr&ptitle=HRRR%20Model%20Fields%20-%20Experimental&maxFcstLen=15&fcstStrLen=-1&resizePlot=1&domain=full&wjet=1 (though it certainly need not be exactly like that).

Does anyone know of (ideally) some sort of GWT module that can do image looping? Or if not, does it sound like something an intermediate programmer could figure out without too much trouble (I’m willing to accept a challenge), even if I’ve never explicitly used GWT before? I’m sure I could whip together something that pulls each image in as it goes through a loop, but prefetching them would be even more ideal.

Please comment if you need clarification on anything!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:07:18+00:00Added an answer on June 4, 2026 at 10:07 pm

    As far as I’m aware there’s not a pre-fab solution to do this, although maybe SmartGWT has something I don’t know about. In any case, it won’t be too hard to roll your own. Here’s some code to get you started:

    public class ImageLooper extends Composite {
        // List of images that we will loop through
        private final String[] imageUrls;
    
        // Index of the image currently being displayed
        private int currentImage = 0;
    
        // The image element that will be displayed to the user
        private final Image image = new Image();
    
        // The Timer provides a means to execute arbitrary
        // code after a delay or at regular intervals
        private final Timer imageUpdateTimer = new Timer() {
            public void run() {
                currentImage = (currentImage + 1) % images.length;
                image.setUrl(imageUrls[currentImage]);
            }
        }
    
        // Constructor. I'll leave it to you how you're going to
        // build your list of image urls.
        public ImageLooper(String[] imageUrls) {
            this.imageUrls = imageUrls;
    
            // Prefetching the list of images.
            for (String url : imageUrls)
                Image.prefetch(url);
    
            // Start by displaying the first image.
            image.setUrl(imageUrls[0]);
    
            // Initialize this Composite on the image. That means
            // you can attach this ImageLooper to the page like you
            // would any other Widget and it will show up as the
            // image.
            initWidget(image);
        }
    
        // Call this method to start the animation
        public void playAnimation() {
            // Update the image every two seconds
            imageUpdateTimer.scheduleRepeating(2000);
        }
    
        // Call this method to stop the animation
        public void stopAnimation() {
            imageUpdateTimer.cancel();
        }
    }
    

    One annoying thing with this implementation is that you have no way of knowing when your list of images has finished loading; Image.prefetch doesn’t have a callback to help you here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.