Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SourceListClickListener should provide access to the raw MouseEvent. #158

Open
GoogleCodeExporter opened this issue May 4, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. View the SourceListClickListener API.

What is the expected output? What do you see instead?

I'd expect to see:
    void sourceListItemClicked(SourceListItem item, MouseEvent event);
    void sourceListCategoryClicked(SourceListCategory category, 
MouseEvent event)

What version of the product are you using? On what operating system?

HEAD (so I guess 0.9.6-SNAPSHOT), on OS X Snow Leopard. But this issue 
related to running apps on multiple platforms, which require different 
behaviour from each other.

Please provide any additional information below.

The raw mouse event is needed to determine when a popup menu should 
be shown, via the JPopupMenu.isPopupTrigger(MouseEvent) method. While 
I generally like the approach of providing a simpler API (the button & 
clickCount parameters in this case) in this case access to the raw event is 
needed in order to interact with the installed look & feel.

Original issue reported on code.google.com by [email protected] on 11 Mar 2010 at 10:29

@GoogleCodeExporter
Copy link
Author

Patch to use suggested API. An alternative would be to keep the current button 
& 
clickCount params and just add the event as an additional param. Unfortunately 
either 
option will break compatibility.

Original comment by [email protected] on 11 Mar 2010 at 3:59

Attachments:

@GoogleCodeExporter
Copy link
Author

OK, I feel silly now. After creating that patch and looking through the code a 
bit more I 
spotted how you've set this up (i.e. the SourceListContextMenuProvider 
interface).

You can close this issue.

Original comment by [email protected] on 11 Mar 2010 at 4:09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant