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

Discussion in 'Java' started by Carla Brommer, Feb 16, 2006.

  1. 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.
     
    Carla Brommer, Feb 16, 2006
    #1
    1. Advertising

  2. 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
     
    Karsten Lentzsch, Feb 16, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    419
    Claudio Grondi
    Sep 6, 2005
  2. =?Utf-8?B?QmlzaG95?=
    Replies:
    0
    Views:
    1,017
    =?Utf-8?B?QmlzaG95?=
    Dec 28, 2006
  3. =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=

    Help on table align on left of page vs left hanging indent

    =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=, Jul 10, 2007, in forum: XML
    Replies:
    2
    Views:
    1,029
    =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=
    Jul 16, 2007
  4. pc
    Replies:
    2
    Views:
    1,374
    crisgoogle
    Jun 8, 2011
  5. Oran
    Replies:
    2
    Views:
    573
Loading...

Share This Page