Hi Paul,
Paul Taylor wrote:
> [...]
> As of yet Im unable to think of a solution, Im not sure if the problem
> is with the MouseHandler after all. Does anyone have an idea of what the
> chain of
> events is when do a CNTl-CLICK
> For example:
> Does the TableUI receive a focus event and a mouse event at the same
> time which is what I thought was happening, or does it only receive a
> Mouse click event but then dispatches a focus event which gets picked up
> by the focus handler. Or is it nothing to do with focus events ?
I did the required changes already in a lab version of my QuaquaTableUI
class.
Here are the steps:
1. Override method createMouseInputListener of your TableUI class, to make
it create an instance of your own.
2. Create an inner MouseInputHandler class. Use the source of
BasicTableUI.MouseInputHandler as a guideline.
3. Change method shouldIgnore(MouseEvent) of this class, to return true, if
the mouse event is a popup trigger.
4. Change all method calls named isControlDown() on the mouse event to
isMetaDown().
And that's about it.
I intend to implement this for TableUI, ListUI and TreeUI for the next minor
update of the Quaqua Look and Feel.
(ListUI is a bit nasty, because BasicListUI has too many private instance
variables and methods to create a descent subclass of it.)
If you don't want to use the whole Quaqua Look and Feel, you can just
include QuaquaTableUI in your application.
> I would recommend they use the OSX LAF but my application does allow
> them to change the Look and Feel to any of the one currently installed.
> I was just thinking that if the main SUN Release built in some support
> for one-click mouses (whatever the platform) even if it was theoretical
> then these issues would be less likely to arise.
Me, I would assume, that someone who uses a different LAF then Aqua on a
Mac, also is likely to use a multi-button mouse or even a mouse with a
scroll wheel.
At least, I would assume, that such a person is apt to figure out, how to
cope with a popup trigger mouse gesture that changes the selection of the
table.
Because up to now, that's how a worked with JTables that had a popup menu.
;)
Cheers,
-Werner
_______________________________________________
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