[9] Review request: JDK-8087709: Can set only second menu as system, when trying to set two menus at once

Morris Meyer morris.meyer at oracle.com
Thu Jul 23 21:05:18 UTC 2015


Folks,

For JavaFX on the Mac the system menu bar feature allows us to load a 
JavaFX menu into the top system menu bar.  This issue was caused by the 
MenuBarSkin not previously cleaning out the original loaded system menu 
and un-setting the originally set menu's useSystemMenuBarProperty().

There is a small API change in that the system menu bar property catches 
any attempts at uni-directional binding and throws a RuntimeException 
warning the developer to use bi-directional bindings instead.

Thus the test program should look like:

         ToggleButton aAsSystem = new ToggleButton("A as system");
barA.useSystemMenuBarProperty().bindBidirectional(aAsSystem.selectedProperty());
         ToggleButton bAsSystem = new ToggleButton("B as system");
barB.useSystemMenuBarProperty().bindBidirectional(bAsSystem.selectedProperty());

Thanks for the review.

         --morris meyer

JBS - https://bugs.openjdk.java.net/browse/JDK-8087709
WEBREV - http://cr.openjdk.java.net/~morris/JDK-8087709.01a/


More information about the openjfx-dev mailing list