|
Quick Lists
|
|
Bug ID:
|
4515765
|
|
Votes
|
0
|
|
Synopsis
|
Win L&F: Disabled menu items should show highlight
|
|
Category
|
java:classes_swing
|
|
Reported Against
|
tiger-beta
, merlin-beta2
|
|
Release Fixed
|
mustang(b53)
|
|
State
|
10-Fix Delivered,
bug
|
|
Priority:
|
3-Medium
|
|
Related Bugs
|
6325555
,
6372377
,
6515207
,
4991600
|
|
Submit Date
|
17-OCT-2001
|
|
Description
|
In the Windows Look and Feel in Java, disabled menu items do not use the "selected" background color when the mouse hovers over them or when they are keyboard navigated. This is inconsistent with standard windows behavior: run any Windows application with some disabled menu items and hover over them - the menu items are highlighted in the windows selection color.
In addition, keyboard navigating menu items should select disabled menu items. To see this, bring up an application in Windows with at least one disabled menu item. Use the down arrow key to navigate the items. Note that disabled menu items are highlighted even though they are disabled. I believe this may be for the purposes of accessibility, so that screen readers can read disabled menu items as well as enabled ones.
(Review ID: 133735)
======================================================================
Posted Date : 2005-09-07 18:03:03.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
This is indeed an issue in 1.4 b83 that was overlooked. This will be fixed for the next release.
Posted Date : 2005-09-07 18:03:03.0
This problem is not easily solvable by the Windows Look and Feel because there are places in the button model that will not allow the button (ie, menu item) to be drawn in the highlight state if the model is disabled.
To solve this I have created a special button model subclass for menu items called JMenuItemButtonModel which extends the DefaultButtonModel and implements the special behavior based on a property which may be set in the UIManager (and *is* set by the WindowsLookAndFeel class).
This solution requires no changes to the button model (abstract or default) and creates a new subclass which is private to the JMenuItem. Thus the only new possibly public api is the property which can be set by the WindowsLookAndFeel class (MenuItem.disabledAreNavigable).
This fix also changes the private nextEnabledChild and previousEnabledChild methods of the BasicPopupMenuUI class to respect the MenuItem.disabledAreNavigable property. This is a private change as well.
Posted Date : 2005-09-07 22:16:54.0
|
|
Comments
|
Submitted On 23-SEP-2003
diegosab
It also makes the popup disappear when the user clicks on a
disabled option.
The menu should remain and the user should move the mouse
to an enabled choice to make a valid selection (or click on
something outside the menu to remove the focus from the
menu altogether)
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |