menu bar api questions

  1. Will you allow in the future api such as Menubar.additem(MenuItem) ? Without this its kinda of hard to subclass MenuItem and have it added to the menubar because the only way to get a menuitem is to call Menubar.additem() which returns a menuitem.
  2. Ability to add a shotcut key for addItem()?

Currently I think adding shortcuts to menu items seems a little messy. Currently to support keyboard shortcuts, we have to write code in the MenuBar.Command.menuSelected to support general mouse based selection and also in the ShortcutAction. Both of these usually just invoke the same function, except 1 invokes it via the mouse other via a keyboard.

I am comparing the vaadin implementation to what I am use to with swing where keyboard shortcuts can be set while adding a menu item and the same AbstractAction object is called whether menu is invoked via a mouse of via keyboard.

http://download.oracle.com/javase/tutorial/uiswing/components/menu.html

I did notice some menubar api improvements scheduled for 6.6, which should definitely menus more powerful. Maybe if any of my requests fit with vaadin design they can be incorporated into 6.6 also.

Thank you! Overall I am happy with the framework.