FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Wheel mouse and focus

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
dasousa



Joined: 16 Aug 2009
Posts: 13

PostPosted: Tue Sep 01, 2009 6:23 pm    Post subject: Wheel mouse and focus Reply with quote

I am running into an issue with a NetBeans 6.7 application running on Windows XP. I am listening for wheel mouse movement in a TopComponent in the editor mode. I used the NetBeans GUI to create the wheel mouse event handler. A very simple test application can be created by just printing the mouse wheel clicks to System.out.

When the editor window is first opened, everything works OK. However, once the Properties window has been displayed and pinned the editor no longer receives mouse wheel events when the properties window has been unpinned. Once the properties window is pinned again, then the mouse wheel events start occuring.

I'd post the code, but it involves the whole application and not just the formMouseWheelMoved method. Does anybody have an idea of what could be happening?

Thanks.
Back to top
View user's profile Send private message
Marek Slama
Posted via mailing list.





PostPosted: Tue Sep 01, 2009 6:47 pm    Post subject: Wheel mouse and focus Reply with quote

dasousa wrote:
Quote:
I am running into an issue with a NetBeans 6.7 application running on Windows XP. I am listening for wheel mouse movement in a TopComponent in the editor mode. I used the NetBeans GUI to create the wheel mouse event handler. A very simple test application can be created by just printing the mouse wheel clicks to System.out.



When the editor window is first opened, everything works OK. However, once the Properties window has been displayed and pinned the editor no longer receives mouse wheel events when the properties window has been unpinned. Once the properties window is pinned again, then the mouse wheel events start occuring.



I'd post the code, but it involves the whole application and not just the formMouseWheelMoved method. Does anybody have an idea of what could be happening?



I do not know what do you mean by pinned / unpinned. Does it mean
overlay mode when side component is painted over center ie. editor?

M.
Quote:
Thanks.




Back to top
dasousa



Joined: 16 Aug 2009
Posts: 13

PostPosted: Tue Sep 01, 2009 8:47 pm    Post subject: Reply with quote

What I mean by pinned is when the property window is docked in the properties mode and not sliding. In other words, the properties window will display even when it is not the active window.

Unpinned means that the property window will slide to the right and become hidden when it does not have the focus. The wheel mouse problem occurs when the properties window is in the state where it has slid to the right and is hidden.

The problem will even occur when the property window is closed after first having been displayed and "pinned" open.
Back to top
View user's profile Send private message
dasousa



Joined: 16 Aug 2009
Posts: 13

PostPosted: Thu Nov 05, 2009 10:01 pm    Post subject: [Solved] Wheel Mouse and Focus Reply with quote

The only way that I was able to solve this problem was to have the TopComponent implement FocusListener. Then to call requestActive() in the focusGained method.

The componentActivated method was never called even when the tab was highlighted blue after closing the Properties window and clicking on the center TopComponent.

Having the TopComponent implement FocusListener, and then add itself as a FocusListener on itself seems a little worrisome. Can anybody think of a better way?

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB