|
|||||||||
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 java.lang.String |
MENU_DOWNLOAD_BAR
The menu used on download bars. |
static java.lang.String |
MENU_DOWNLOAD_CONTEXT
All menus which are Download specific, such as download bars, the
Torrent menu, torrent tables etc. |
static java.lang.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 java.lang.String |
MENU_MENUBAR
The "Plugins" menu on the menu bar. |
static java.lang.String |
MENU_SYSTRAY
The menu used for the system tray icon. |
static java.lang.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 java.lang.String |
MENU_TAG_CONTEXT
|
static java.lang.String |
MENU_TORRENT_MENU
The "Torrents" menu. |
static java.lang.String |
MENU_TRANSFERSBAR
The "transfers bar". |
Method Summary | |
---|---|
MenuItem |
addMenuItem(MenuContext context,
java.lang.String resource_key)
Creates a menu item in a particular context. |
MenuItem |
addMenuItem(MenuItem parent,
java.lang.String resource_key)
Creates a menu item as a sub-item of the given menu item. |
MenuItem |
addMenuItem(java.lang.String menuID,
java.lang.String resource_key)
Creates a menu item for the appropriate menu. |
Field Detail |
---|
static final java.lang.String MENU_TABLE
TableManager
,
Constant Field Valuesstatic final java.lang.String MENU_SYSTRAY
static final java.lang.String MENU_DOWNLOAD_BAR
static final java.lang.String MENU_MENUBAR
static final java.lang.String MENU_TRANSFERSBAR
static final java.lang.String MENU_TORRENT_MENU
static final java.lang.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 java.lang.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 java.lang.String MENU_TAG_CONTEXT
Method Detail |
---|
MenuItem addMenuItem(java.lang.String menuID, java.lang.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, java.lang.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, java.lang.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 |