adding listener when scrollBar has finished scrolling

18 views
Skip to first unread message

Shivi

unread,
Apr 5, 2009, 12:57:58 PM4/5/09
to Google Web Toolkit
I need to add a listener to the scroll bar when it has finished
scrolling.

This is because sometimes user scrolls down fast and sometimes user
could be scrolling slowly.

My listener to the scrollbar populates rows of a flexTable as the user
scrolls.
When a user scrolls slowly, then it is good to see those rows getting
populated.

But when the user scrolls down fast, I don't want to add listener to
scrollBar at that time. I only want to add the listener after fast
scrolling has finished.

How can I implement this?

Thanks in advance for your help

Arthur Kalmenson

unread,
Apr 7, 2009, 9:48:11 AM4/7/09
to Google-We...@googlegroups.com
Why don't you just use an IncrementalCommand
(http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/IncrementalCommand.html)
to populate the list instead. This doesn't lock up the browser and
lets you populate the whole table.

Better yet, check out the PagingScrollTable
(http://code.google.com/docreader/#p=google-web-toolkit-incubator&s=google-web-toolkit-incubator&i=PagingScrollTable)
in the gwt-incubator.

Regards,
--
Arthur Kalmenson

matttai

unread,
Apr 7, 2009, 7:25:02 PM4/7/09
to Google Web Toolkit
I know that the above post might provide a solution for the user's
problem, but i'm actually interested in detecing when a scrollBar
reaches the bottom of a page as well to implement something like:

When user scrolls to the very bottom of the page popup with message X.

Thanks.

On Apr 7, 11:48 pm, Arthur Kalmenson <arthur.k...@gmail.com> wrote:
> Why don't you just use an IncrementalCommand
> (http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...)
> to populate the list instead. This doesn't lock up the browser and
> lets you populate the whole table.
>
> Better yet, check out the PagingScrollTable
> (http://code.google.com/docreader/#p=google-web-toolkit-incubator&s=go...)
> in the gwt-incubator.
>
> Regards,
> --
> Arthur Kalmenson
>
>
>
> On Sun, Apr 5, 2009 at 12:57 PM, Shivi <shivi.chan...@gmail.com> wrote:
>
> > I need to add alistenerto the scroll bar when ithasfinished
> >scrolling.
>
> > This is because sometimes user scrolls down fast and sometimes user
> > could bescrollingslowly.
>
> > Mylistenerto thescrollbarpopulates rows of a flexTable as the user
> > scrolls.
> > When  a user scrolls slowly, then it is good to see those rows getting
> > populated.
>
> > But when the user scrolls down fast, I don't want to addlistenerto
> >scrollBarat that time. I only want to add thelistenerafter fast
Reply all
Reply to author
Forward
0 new messages