Package com.biglybt.pif.ui.menus
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The menu used on download bars.static final String
All menus which areDownload
specific, such as download bars, the Torrent menu, torrent tables etc.static final String
All menus which areDiskManagerFileInfo
specific, such as the Files tab in Torrent Details view, or the file row within the library viewstatic final String
The "Plugins" menu on the menu bar.static final String
The "Tools" menu on the menu bar.static final String
static final String
The menu used for the system tray icon.static final String
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.static final String
static final String
The "Torrents" menu.static final String
The "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:
-
TableManager
- Constant Field Values
-
MENU_SYSTRAY
The menu used for the system tray icon.- See Also:
-
MENU_DOWNLOAD_BAR
The menu used on download bars.- See Also:
-
MENU_MENUBAR
The "Plugins" menu on the menu bar.- See Also:
-
MENU_MENUBAR_TOOLS
The "Tools" menu on the menu bar.- See Also:
-
MENU_TRANSFERSBAR
The "transfers bar".- Since:
- 3.0.1.3
- See Also:
-
MENU_TORRENT_MENU
The "Torrents" menu.- Since:
- 3.0.2
- See Also:
-
MENU_DOWNLOAD_CONTEXT
All menus which areDownload
specific, such as download bars, the Torrent menu, torrent tables etc.data or target parameter in listener triggers will be an array of
Download
- Since:
- 3.0.2
- See Also:
-
MENU_FILE_CONTEXT
All menus which areDiskManagerFileInfo
specific, 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
-