I implemented dynamic menus for my application window, which will only be loaded if the user moves the cursor above the submenu (because, this could take some times and is not always needed). In swing, I can register a javax.swing.event.MenuListener using addMenuListener() at the JMenu. This listener will be informed, if the menu is selected and if it should be shown, then I start loading the missing menu items.
Is there a similar functionality in your framework to register such an listener (maybe at a CMenu) ?
Thanks a lot,
Unfortunately all the menus are built eagerly.
However, there is only one class* that generates submenus. You can replace that class with an implementation that builds the submenus lazy. If I remember correctly, accessing the DockActionViewConverter (DockController.getActionViewConverter) and using “putClient( ActionType.MENU, ViewTarget.MENU, )” should already be enough to catch all submenus including those of popup-menus. You might want to test this claim before starting your implementation…
- the class is “MenuMenuHandler”. I’m not entirely sure how to implement your customised class, but I think you should start by copying MenuMenuHandler.