JDK-8127068 : GlassSystemMenu class in Quantum does not support visibility property for menus and menu items
Type:Bug
Component:javafx
Sub-Component:controls
Affected Version:fx2.1
Priority:P4
Status:Resolved
Resolution:Fixed
Submitted:2012-01-19
Updated:2015-06-17
Resolved:2012-01-20
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
GlassSystemMenu needs to check the "visible" property before adding menus and items, and install listeners to rebuild the menu bar when a property changes value dynamically.
Comments
I don't have the equipment to verify the fix, but here are the steps to test it:
1. Run HelloMenu on MacOS.
2. Verify that it is using the system menu bar.
3. Open the menu 'Debug' -> 'New'.
4. Uncheck the item 'Show "foo" item'.
5. Open the menu 'Debug' -> 'New' again.
6. Verify that the item 'foo' is not showing.