API provides a way to create a popup menu from actions. Of course, you can use the standard java api for that, but we provide our own creators if you use our Actions.
Use com.nomagic.magicdraw.actions.MenuCreatorFactory.getMenuCreator() to get an instance of a creator.
Use com.nomagic.actions.ActionsMenuCreator.createPopupMenu(ActionsManager) to create a popup menu.
Steps to create a popup menu would be
- Create an instance of com.nomagic.actions.ActionsManager.
- Add com.nomagic.actions.NMAction actions and com.nomagic.actions.ActionsCategory categories into ActionsManager.
- Call ActionsMenuCreator.createPopupMenu(ActionsManager) to create a popup for your actions.
Related pages