Interface MenuManager

All Known Implementing Classes:
MenuManagerImpl

public interface MenuManager
Helper class to allow plugins to register their own menus. If you want to add menus to be available in tables, you should use the TableManager class.

To get an instance of MenuManager, use UIManager.getMenuManager()

Since:
3.0.0.7
See Also:
  • TableManager
  • Field Details

  • Method Details

    • addMenuItem

      MenuItem addMenuItem(String menuID, String resource_key)
      Creates a menu item for the appropriate menu.

      On plugin unload, use MenuItem.remove() or MenuItem.removeAllChildItems()

      Parameters:
      menuID - The MENU_ identifier as defined above.
      resource_key - ID of the menu, which is also used to retrieve the textual name from the plugin language file.
      Returns:
      The newly created menu item with style MenuItem.STYLE_PUSH
    • addMenuItem

      MenuItem addMenuItem(MenuContext context, String resource_key)
      Creates a menu item in a particular context. MenuContext instances can be retrieved from some plugin objects that support menu items to be added to it.

      Example: When adding menus to UISWTStatusEntry, call UISWTStatusEntry#getMenuContext() to get the MenuContext, and then pass it into this function.

      On plugin unload, use MenuItem.remove() or MenuItem.removeAllChildItems()

      Parameters:
      context - The menu context object which represents the place to add a menu item.
      resource_key - ID of the menu, which is also used to retrieve the textual name from the plugin language file.
      Returns:
      The newly created menu item.
      Since:
      3.0.5.3
    • addMenuItem

      MenuItem addMenuItem(MenuItem parent, String resource_key)
      Creates a menu item as a sub-item of the given menu item.

      On plugin unload, use MenuItem.remove() or MenuItem.removeAllChildItems()

      Parameters:
      parent - The MenuItem to add this new item to. The parent MenuItem must have its style attribute to be set to "menu".
      resource_key - ID of the menu, which is also used to retrieve the textual name from the plugin language file.
      Returns:
      The newly created menu item.
    • getMenuItems

      List<MenuItem> getMenuItems(String menu_id, String resource_key)