Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to change popupTrigger in L&F from right to left button

Reply
Thread Tools

How to change popupTrigger in L&F from right to left button

 
 
Carla Brommer
Guest
Posts: n/a
 
      02-16-2006
I'm looking for a sollution to change the isPopupTrigger for a
MouseEvent from the right mouse button to the left mousebutton (in
Windows). Until now I have solved this problem by writing a
MouseListener for handling the MouseEvent, but reading al the API I've
got the impression that the isPopupTrigger can be changed in the L&F.
But I cant find it, does anybody know how?

Carla.
 
Reply With Quote
 
 
 
 
Karsten Lentzsch
Guest
Posts: n/a
 
      02-16-2006
Carla Brommer wrote:

> I'm looking for a sollution to change the isPopupTrigger for a
> MouseEvent from the right mouse button to the left mousebutton (in
> Windows). Until now I have solved this problem by writing a
> MouseListener for handling the MouseEvent, but reading al the API I've
> got the impression that the isPopupTrigger can be changed in the L&F.


Since Java 1.3 there's JPopupMenu#isPopupTrigger(MouseEvent).
This in turn asks the L&f's popup menu implementation,
see PopupMenuUI#isPopupTrigger(MouseEvent).

As of Java 1.6 all core L&fs use the behavior
specified in BasicPopupMenuUI#isPopupTrigger.

You can provide a custom PopupMenuUI that
can override the popup trigger behavior.
I'm not aware of a third party l&f that
allows to configure this via the UIManager.

-Karsten
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Menu Items is not right aligned with Right to Left documen =?Utf-8?B?QmlzaG95?= ASP .Net 0 12-28-2006 11:39 AM
left/right mouse button events not trapped mitsura@skynet.be Python 3 09-06-2005 04:11 PM
Align javascript alert message to right AND / OR make the direction as RIGHT-TO-LEFT Oran Javascript 2 12-03-2004 04:34 PM
Tool to right click image in windows explorer and rotate image right or left 90 degrees siliconpi Digital Photography 2 11-29-2004 12:56 PM
Left panel on left hand side of desktop on windows xp wish to get rid of Bun Mui Computer Support 1 09-14-2004 03:40 AM



Advertisments