Could you just set the busy cursor on the display? I imagine that might produce a better user experience, anyways - you basically want to show the user that the entire app is busy (vs. a single button, for example).
G On Jun 15, 2011, at 11:59 AM, Roger L. Whitcomb wrote: > What I'm trying to do is change the mouse to a wait cursor when the user > presses the Enter key or the "OK" button is clicked with the mouse. In this > particular case, there is a slight but noticeable delay for the operation to > happen, so I'd like to have the user feedback of a wait cursor during this > time. I have implemented all this stuff in the "previewDialogClose" method > of the DialogStateListener. So, I have to find the component that the mouse > is currently positioned over in order to do the capture and change the > cursor. In the case of user clicking with the mouse on "OK" this is fine, > but in the Enter key case, the mouse could be pretty much anywhere so I have > to go looking for the component the mouse is over and it appears not to be > over any component, so the capture can't be done and the wait cursor never > gets set. So, the fail case is this: > - User clicks on a button or link button to bring up a dialog, which opens > covering up the original button in the owner window. > - Without moving the mouse, user starts to type something in a dialog field > and presses Enter to initiate the operation (which will close the dialog if > successful). > - Wait cursor would like to come up but I can't find any component for which > "isMouseOver()" is true, so capture doesn't work. > > Is that clear enough? I can do a screen cam movie if you want to demonstrate > the use case. > > But, I imagine (although I haven't tested this), based on what you're saying, > that if I were to set a custom mouse cursor on a component in this same > scenario that the cursor wouldn't change correctly when the dialog comes up > (or goes away) until the mouse was moved again. > > > Thanks, > ~Roger > > > -----Original Message----- > From: Greg Brown [mailto:[email protected]] > Sent: Wed 6/15/2011 8:39 AM > To: [email protected] > Subject: Re: Question about mouse location > > It's a pretty deep issue. The reverse is also true - when you close a dialog, > the mouse pointer is not updated either. > > Can you help me understand the use case a little better? You press a button > which opens a dialog, and the mouse becomes positioned over a new component > that is a child of the Dialog. Is this component's cursor (or the cursor of > one of its ancestors) set to the busy cursor? > > > On Jun 15, 2011, at 11:31 AM, Roger L. Whitcomb wrote: > > > In other words, I would like it to work at some point, but it is not > > urgent. I can look at it also if that would help. > > > > ~Roger > > > > > > -----Original Message----- > > From: Roger and Beth Whitcomb [mailto:[email protected]] > > Sent: Tue 6/14/2011 6:24 PM > > To: [email protected] > > Subject: Re: Question about mouse location > > > > Well, currently the only implication is that I don't get a wait cursor > > when I hit the Enter key on my dialog if the mouse hasn't moved. So, > > not a real big deal. > > > > ~Roger > > > > On 6/14/11 5:52 PM, Greg Brown wrote: > > > Actually, it is supposed to work as you describe. > > > TerraDialogSkin#windowOpened() calls reenterMouse() on the display, > > > which should trigger a mouse over on the current component. However, > > > after stepping through the code, I see a number of reasons why this > > > does not happen. I'm not sure yet what the right solution might be. > > > > > > How big of an issue is this for you? > > > > > > G > > > > > > On Jun 14, 2011, at 6:53 PM, Roger L. Whitcomb wrote: > > > > > >> Question: if I have a button (for instance) which when pressed opens > > >> a dialog such that this dialog is positioned right where the button > > >> is, so that it obscures the button, should there be any component on > > >> the new dialog that has "isMouseOver()" true (without moving the > > >> mouse after the dialog opens)? It seems like there isn't any until > > >> the mouse moves, although I haven't conclusively proven that. But, > > >> should the dialog/window "open" trigger a pseudo-mouse move so that > > >> the component now under the mouse has its "mouseLocation" set? Or am > > >> I asking too much?? Thanks. > > >> *Roger Whitcomb* > > >> Architect, Engineering > > >> *Ingres Corporation*** > > >> [email protected] <mailto:[email protected]> > > >> *PHONE*+1 650.587.5596 > > >> *FAX*+1 650.587.5550 > > >> *www.ingres.com* <http://www.ingres.com/> > > >> This transmission is confidential and intended solely for the use of > > >> the recipient named above. It may contain confidential, proprietary, > > >> or legally privileged information. If you are not the intended > > >> recipient, you are hereby notified that any unauthorized review, use, > > >> disclosure or distribution is strictly prohibited. If you have > > >> received this transmission in error, please contact the sender by > > >> reply e-mail and delete the original transmission and all copies from > > >> your system. > > > > > > > > > > > > >
