Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8091550

Support MenuItem in MenuBar

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • fx2.0
    • javafx
    • Windows 7 64bit, JDK 7 EA b144 32bit, JavaFX b30 32bit

      Currently MenuBar only accepts Menu objects which limits the scope of what people may insert into a menu bar. For example nowadays, it's not uncomon to find search boxes, buttons and other controls (information display, scrolling text, combos, graph of audio signant, etc.) in a menu bar (ie: NetBeans 7 just happen to have a search box on the right side of its menu bar).

      Now the Menu class does not allow to embed a node inside a menu, while the NodeMenuItem class seems to allow such thing.
      It would probably be better to expand the scope of MenuBar to accept MenuItem instances instead of only Menu.
      Would probably need to replace getMenus() by getItems() in the MenuBar API too.

      A follow up suggestion would be to allow hitting at the placement of menus&menuitems in the bar (ie: on some platforms some secondary menus and items may be aligned on the right side of the bar instead of just flowing from the left.

            Unassigned Unassigned
            fbouyajfx Fabrice Bouyé (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported: