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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe menu used on download bars.static final StringAll menus which areDownloadspecific, such as download bars, the Torrent menu, torrent tables etc.static final StringAll menus which areDiskManagerFileInfospecific, such as the Files tab in Torrent Details view, or the file row within the library viewstatic final StringThe "Plugins" menu on the menu bar.static final StringThe "Tools" menu on the menu bar.static final Stringstatic final StringThe menu used for the system tray icon.static final StringThe menu used for tables - this value cannot be used directly to create menus used by tables, you need to use the TableManager class to create such menu items.static final Stringstatic final StringThe "Torrents" menu.static final StringThe "transfers bar". -
Method Summary
Modifier and TypeMethodDescriptionaddMenuItem(MenuContext context, String resource_key) Creates a menu item in a particular context.addMenuItem(MenuItem parent, String resource_key) Creates a menu item as a sub-item of the given menu item.addMenuItem(String menuID, String resource_key) Creates a menu item for the appropriate menu.getMenuItems(String menu_id, String resource_key)
-
Field Details
-
MENU_TABLE
The menu used for tables - this value cannot be used directly to create menus used by tables, you need to use the TableManager class to create such menu items.- See Also:
-
MENU_SYSTRAY
-
MENU_DOWNLOAD_BAR
-
MENU_MENUBAR
-
MENU_MENUBAR_TOOLS
-
MENU_TRANSFERSBAR
-
MENU_TORRENT_MENU
-
MENU_DOWNLOAD_CONTEXT
-
MENU_FILE_CONTEXT
All menus which areDiskManagerFileInfospecific, such as the Files tab in Torrent Details view, or the file row within the library viewdata or target parameter in listener triggers will be an array of
DiskManagerFileInfo- Since:
- 5.6
- See Also:
-
MENU_TAG_CONTEXT
- Since:
- 5.6
- See Also:
-
MENU_SUBSCRIPTION_RESULT_CONTEXT
- See Also:
-
-
Method Details
-
addMenuItem
Creates a menu item for the appropriate menu.On plugin unload, use
MenuItem.remove()orMenuItem.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
-
getMenuItems
-