T
- platform specific menu type (ie. javafx.scene.control.Menu for Java FX
or org.eclipse.swt.widgets.Menu for SWT)S
- platform specific menu item typepublic interface DMXMenuService<T,S>
Modifier and Type | Method and Description |
---|---|
void |
addAfterMenu(String menuId,
T menu)
Adds specified menu to menu bar after the menu with ID
menuId . |
void |
addMenuItemToMenu(String menuId,
S menuItem)
Adds specified menu item to menu with specified ID.
|
void |
addSubmenuToMenu(String menuId,
T subMenu)
Adds
subMenu as a sub menu of menu with ID menuId . |
void |
appendToMenuBar(T menu)
Appends specified menu at the end of menu bar.
|
void |
insertAtIndex(int index,
T menu)
Insert specified menu at
index position in menu bar. |
void |
insertMenuItem(String menuId,
int index,
S item)
Insert specified menu item at position
index within menu with ID menuId . |
void |
insertSeparator(String menuId,
int index)
Insert separator at specified index in the menu.
|
void |
registerControllerForAction(String menuItemId,
String controllerId,
Object... params)
Registers controller to be invoked when menu item is fired.
|
void |
registerEventHandlerForMenuItem(String menuItemId,
DMXEventRegistrationHandler handler)
Registers event handler for specified menu item.
|
void appendToMenuBar(T menu)
menu
- menu to appendvoid addAfterMenu(String menuId, T menu)
menuId
. If menu with
ID matching menuId
, menu will be appended to the end of menu bar. Also, if
menuId
is null
, menu will be appended to end of menu bar.menuId
- menu IDmenu
- menu to addvoid insertAtIndex(int index, T menu)
index
position in menu bar. If index
is not
a valid index, menu will be appended to the end of menu bar.index
- index in menu bar where menu should be insertedmenu
- menu to insertvoid addMenuItemToMenu(String menuId, S menuItem)
menuId
- ID of menu to which item should be addedmenuItem
- menu item to addvoid insertMenuItem(String menuId, int index, S item)
index
within menu with ID menuId
.menuId
- menu IDindex
- index to insert toitem
- menu item to insertvoid addSubmenuToMenu(String menuId, T subMenu)
subMenu
as a sub menu of menu with ID menuId
.menuId
- ID of parent menusubMenu
- submenuvoid insertSeparator(String menuId, int index)
menuId
- ID of menu in which to insert separatorindex
- separator position inside menu (zero-based)void registerControllerForAction(String menuItemId, String controllerId, Object... params)
menuItemId
- ID of menu itemcontrollerId
- controller IDparams
- optional parameters for controller executionvoid registerEventHandlerForMenuItem(String menuItemId, DMXEventRegistrationHandler handler)
menuItemId
- menu item IDhandler
- event handlerCopyright © 2012-2014 Vektor Software. All Rights Reserved.