Saturday, June 16, 2012

using the mgwt swipe panel

This post is part of a series of blogposts that show the usage of  some mgwt / gwt-phonegap components.

This blog post will show the use of the Carousel widget in mgwt. The widget can be used to display different content in a horizontal row. Users can access the content by swiping to it.

The widget looks like this:

To build this you need to do the following steps:

1. Setup the viewport for the mobile browser:

2. Instantiate an AnimationHelper and attach it to the RootPanel:

AnimationHelper animationHelper = new AnimationHelper();

3. Instantiate a LayoutPanel and add in the Carousel widget:
LayoutPanel layoutPanel = new LayoutPanel();
Carousel carousel = new Carousel();

4. Add some content to the Carousel:

5. Animate to the created UI:
animationHelper.goTo(layoutPanel, Animation.SLIDE);

The complete code example can be found here. If you want to see the widget in action, take a look into the showcase.


  1. Hi Daniel.

    Thanks, the Carousel is almost what I need.
    The thing is that I need a circular carousel (i.e.
    where after the last page, the first page comes again).
    More preciselly, I need the effect of swiping from
    the last page to the first to be as if they were consecutive
    pages (and not a 'rewind' effect). There exist a way of using
    the carousel to achive that? Is there an easy way to provide
    this functionality?

    Thanks in advance,


  2. Thumbs up only to that mobile phone deal which fits to your budget requirement. Never go beyond your price limitation. If you are buying contract phone deal, then be sure that the charged line rental must be within your business calls

  3. a free mobile tracker has many uses, and should not be ignored. You should locate a free well in advance of needing one so that you are familiar with the site and how it works.

  4. Thanks a lot for your efforts to have had these things together on this blog site. Mary and i also very much appreciated your input through your articles with certain things. I recognize that you have many demands in your schedule hence the fact that you actually took the maximum amount of time as you did to guide people really like us via this article is actually highly valued. PSD to HTML

  5. good ,we should do much , l like this ,so we can do much things , l have the sip speaker.sometime we will see the emergency roadside telephone and emergency call box.

  6. This is among the most popular mobile website as it help me to a whole lot to locates my needs on my modest mobile phone accessories Ersatzteile Smartphones easily therefore normally i seem on this website everyday possibly 9 intervals daily i actually love this particular page many thanks a lot more power


  8. It is a powerful video downloader and is available on free video sharing sites like Facebook, Daily Motion, Echo, and over 100 movie sharing sites,
    In addition to downloading videos from their original formats,
    Allavsoft converts downloaded videos into popular video formats such as MP4, AVI, WMV, MOV, MPG-1, MPG-2, VOB, ASF, RMVB etc.
    Free Download link for Allavsoft Video Downloader Converter Crack is given below: