Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #4696

Re: fighting over the scroller

From "John B. Matthews" <nospam@nospam.invalid>
Newsgroups comp.lang.java.gui
Subject Re: fighting over the scroller
Date 2011-09-20 19:15 -0400
Organization The Wasteland
Message-ID <nospam-30920C.19151020092011@news.aioe.org> (permalink)
References <ucsh77pf9v4eoo7o8jjjoqrdt4ptjpg4fm@4ax.com>

Show all headers | View raw


In article <ucsh77pf9v4eoo7o8jjjoqrdt4ptjpg4fm@4ax.com>,
 Roedy Green <see_website@mindprod.com.invalid> wrote:

> Any program that uses JScrollPane has a potential problem if it ever 
> sets the position of the scroll using one of the techniques at 
> http://mindprod.com/jgloss/jscrollpane.html The user may also be 
> trying to scroll at the same time.
> 
> The program should defer to the user, e.g. if the user has recently 
> moved the scroll, or is holding the thumbar with mouse right now, 
> defer the scroll move to later, and ignore it entirely if there is 
> another scroll setting.
> 
> This logic properly belongs in JScrollPane.  I wonder if anyone has 
> ever tackled this problem or wants to.
> 
> There might even be a way to introduce it into arbitrary programs 
> unaware of the problem, with a L&F.

This example highlights the effect. While it's easy to demonstrate 
contention, say by simultaneously gesturing with the mouse and holding 
down an arrow key, correct use of the EDT keeps events well-ordered.

<http://stackoverflow.com/questions/7201509>

Is this a problem in practice?

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

fighting over the scroller Roedy Green <see_website@mindprod.com.invalid> - 2011-09-20 13:51 -0700
  Re: fighting over the scroller "John B. Matthews" <nospam@nospam.invalid> - 2011-09-20 19:15 -0400
    Re: fighting over the scroller Roedy Green <see_website@mindprod.com.invalid> - 2011-09-20 23:21 -0700
      Re: fighting over the scroller "John B. Matthews" <nospam@nospam.invalid> - 2011-09-22 13:41 -0400
        Re: fighting over the scroller Roedy Green <see_website@mindprod.com.invalid> - 2011-09-22 18:34 -0700
          Re: fighting over the scroller "John B. Matthews" <nospam@nospam.invalid> - 2011-09-22 23:26 -0400

csiph-web