-
Enhancement
-
Resolution: Fixed
-
P2
-
9
-
b127
javax/swing/plaf/basic/BasicMenuItemUI implements as follows :-
protected void doClick(MenuSelectionManager msm) {
...
...
msm.clearSelectedPath();
...
}
The line above closes and unselects all the menu components
once a choice has been made.
External code is over-riding JDK internal classes in order to
prevent this being cleared. In particular it is being applied
by subclassing MotifCheckBoxMenuItemUI and
WindowsCheckBoxMenuItemUI.
Assuming this behaviour is important it would be better done
by setting a swing property.
This would need to be supported by all L&Fs and we can
make it so for at least the built-in ones by modifying the
above code in BasicMenuItemUI
protected void doClick(MenuSelectionManager msm) {
...
...
msm.clearSelectedPath();
...
}
The line above closes and unselects all the menu components
once a choice has been made.
External code is over-riding JDK internal classes in order to
prevent this being cleared. In particular it is being applied
by subclassing MotifCheckBoxMenuItemUI and
WindowsCheckBoxMenuItemUI.
Assuming this behaviour is important it would be better done
by setting a swing property.
This would need to be supported by all L&Fs and we can
make it so for at least the built-in ones by modifying the
above code in BasicMenuItemUI
- relates to
-
JDK-8165234 Provide a way to not close toggle menu items on mouse click on component level
-
- Closed
-
-
JDK-8160879 [PIT] CloseOnMouseClickPropertyTest fails with AA hint:Nonantialiased rendering mode exception
-
- Resolved
-