|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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()
TableManager
Field Summary | |
---|---|
static String |
MENU_DOWNLOAD_BAR
The menu used on download bars. |
static String |
MENU_DOWNLOAD_CONTEXT
All menus which are Download specific, such as download bars, the
Torrent menu, torrent tables etc. |
static String |
MENU_FILE_CONTEXT
All menus which are DiskManagerFileInfo specific, such as the
Files tab in Torrent Details view, or the file row within the library view |
static String |
MENU_MENUBAR
The "Plugins" menu on the menu bar. |
static String |
MENU_SYSTRAY
The menu used for the system tray icon. |
static String |
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. |
static String |
MENU_TAG_CONTEXT
|
static String |
MENU_TORRENT_MENU
The "Torrents" menu. |
static String |
MENU_TRANSFERSBAR
The "transfers bar". |
Method Summary | |
---|---|
MenuItem |
addMenuItem(MenuContext context,
String resource_key)
Creates a menu item in a particular context. |
MenuItem |
addMenuItem(MenuItem parent,
String resource_key)
Creates a menu item as a sub-item of the given menu item. |
MenuItem |
addMenuItem(String menuID,
String resource_key)
Creates a menu item for the appropriate menu. |
Field Detail |
---|
static final String MENU_TABLE
TableManager
,
Constant Field Valuesstatic final String MENU_SYSTRAY
static final String MENU_DOWNLOAD_BAR
static final String MENU_MENUBAR
static final String MENU_TRANSFERSBAR
static final String MENU_TORRENT_MENU
static final String MENU_DOWNLOAD_CONTEXT
Download
specific, such as download bars, the
Torrent menu, torrent tables etc.
data or target parameter in listener triggers will be an array of
Download
static final String MENU_FILE_CONTEXT
DiskManagerFileInfo
specific, such as the
Files tab in Torrent Details view, or the file row within the library view
data or target parameter in listener triggers will be an array of
DiskManagerFileInfo
static final String MENU_TAG_CONTEXT
Method Detail |
---|
MenuItem addMenuItem(String menuID, String resource_key)
On plugin unload, use MenuItem.remove()
or MenuItem.removeAllChildItems()
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.
MenuItem addMenuItem(MenuContext context, String resource_key)
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()
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.
MenuItem addMenuItem(MenuItem parent, String resource_key)
On plugin unload, use MenuItem.remove()
or MenuItem.removeAllChildItems()
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |