Name: jk109818 Date: 03/17/2003
FULL PRODUCT VERSION :
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
FULL OS VERSION :
Linux vova 2.4.18-26.8.0 #1 Mon Feb 24 10:21:42 EST 2003 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The implementation of BasicTreeUI.isToggleSelectionEvent() doesn't take in account that the Ctrl+LeftMouseButton can be a popup trigger on some platforms. For example under Mac OS X it's true. As the result we have the following behaviour: let's suppose that user selected some node in the tree and press Ctrl+LeftMouseButton to show up the popup menu associated with the tree. This event causes clearing of the selecting item. As the result the action which works with the selected item (selection is empty now!!!) does nothing. Perhaps this sounds like exotic, but it's very serious problem for Mac OS X users (which work with IntelliJ IDEA, for example) in Metal Look And Feel. Metal is derived from BasicLookAndFeel therefore it has the same problem. I'd like to suggest to add the additional check to BasicTreeUI.isToggleSelectionMethod method:
protected boolean isToggleSelectionEvent(MouseEvent event){
return (SwingUtilities.isLeftMouseButton(event) &&event.isControlDown() && !event.isPopupTrigger());
}
REPRODUCIBILITY :
This bug can be reproduced always.
(Review ID: 182636)
======================================================================