Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Contetxtual Menu changes selection



OK, thanks based on what youve said Ive just added this and works for my particular problem

import javax.swing.plaf.basic.*;
import javax.swing.plaf.*;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.event.*;

public class OSXTableUI extends BasicTableUI
{
/**
* Creates a new instance.
*/
public OSXTableUI()
{
}

public static ComponentUI createUI(JComponent c)
{
return new OSXTableUI();
}

/**
* Creates the mouse listener for the JTable.
*/
protected MouseInputListener createMouseInputListener()
{
return new OSXMouseInputHandler();
}

/**
* Added isPopTrigger check
*/
public class OSXMouseInputHandler extends BasicTableUI.MouseInputHandler
{
private boolean shouldIgnore(MouseEvent e)
{
return e.isConsumed()
||
(!(SwingUtilities.isLeftMouseButton(e) && table.isEnabled()))
||
(e.isPopupTrigger());
}
}
}

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Contetxtual Menu changes selection (From: Werner Randelshofer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.