public interface IMenuBarModel extends IListModelObservable
| Modifier and Type | Method and Description |
|---|---|
void |
addAfter(IMenuModel newMenu,
java.lang.String id)
Adds a menu after another menu
|
void |
addBefore(IMenuModel newMenu,
java.lang.String id)
Adds a menu before another menu
|
IMenuModel |
addMenu()
Creates and add a menu
|
void |
addMenu(IMenuModel menu)
Adds a menu
|
IMenuModel |
addMenu(IMenuModelBuilder menuBuilder)
Creates and adds a menu defined by a builder.
|
void |
addMenu(int index,
IMenuModel menu)
Adds a menu at a given index
|
IMenuModel |
addMenu(int index,
IMenuModelBuilder menuBuilder)
Creates and adds a menu defined by a builder at a given index
|
IMenuModel |
addMenu(java.lang.String text)
Creates and add a menu
|
IMenuModel |
addMenu(java.lang.String text,
IImageConstant icon)
Creates and add a menu
|
IMenuModel |
addMenu(java.lang.String text,
java.lang.String toolTipText)
Creates and add a menu
|
IMenuModel |
addMenu(java.lang.String text,
java.lang.String toolTipText,
IImageConstant icon)
Creates and add a menu
|
void |
addMenusOfModel(IMenuBarModel model)
Adds all menus of a given menu bar
|
void |
bind(IMenuBarModel model)
Binds the given model to this model with the following manner:
1.
|
IMenuBarModel |
createCopy()
Creates a deep copy of the model and its children.
|
IMenuModel |
findMenuById(java.lang.String id)
Searches for a menu with a given id
|
java.util.List<IMenuModel> |
getMenus()
Gets a unmodifieable copy of all menus
|
void |
removeAllMenus()
Removes all menus
|
void |
removeMenu(IMenuModel item)
Removes a menu
|
void |
removeMenu(int index)
Removes a menu at a given index
|
void |
unbind(IMenuBarModel model)
Unbind the given model.
|
addListModelListener, removeListModelListenervoid addMenu(IMenuModel menu)
menu - The menu to addvoid addMenu(int index,
IMenuModel menu)
index - The index where to add the menumenu - The menu to addIMenuModel addMenu(IMenuModelBuilder menuBuilder)
menuBuilder - The builder that defines the menuIMenuModel addMenu(int index, IMenuModelBuilder menuBuilder)
index - The index where to add the menumenuBuilder - The builder that defines the menuIMenuModel addMenu()
IMenuModel addMenu(java.lang.String text)
text - The label text of the menuIMenuModel addMenu(java.lang.String text, java.lang.String toolTipText)
text - The label text of the menutoolTipText - The tooltip text of the menuIMenuModel addMenu(java.lang.String text, IImageConstant icon)
text - The label text of the menuicon - The icon of the menuIMenuModel addMenu(java.lang.String text, java.lang.String toolTipText, IImageConstant icon)
text - The label text of the menutoolTipText - The tooltip text of the menuicon - The icon of the menuvoid addAfter(IMenuModel newMenu, java.lang.String id)
newMenu - The menu to addid - The id of the menu to add the newMenu afterjava.lang.IllegalArgumentException - if no menu with the given id exists,
use findMenuById(String) to check if the menu existvoid addBefore(IMenuModel newMenu, java.lang.String id)
newMenu - The menu to addid - The id of the menu to add the newMenu beforejava.lang.IllegalArgumentException - if no menu with the given id exists,
use findMenuById(String) to check if the menu existvoid addMenusOfModel(IMenuBarModel model)
model - The menu bar which models should be addedvoid removeMenu(IMenuModel item)
item - The menu to removevoid removeMenu(int index)
index - The index where to remove the menuvoid removeAllMenus()
java.util.List<IMenuModel> getMenus()
IMenuModel findMenuById(java.lang.String id)
id - The id of the menu to search forvoid bind(IMenuBarModel model)
model - The model to bind this model tojava.lang.IllegalArgumentException - if the given model is nullvoid unbind(IMenuBarModel model)
model - the model to unbind, may be not bound already but must not be nulljava.lang.IllegalArgumentException - if the given model is nullIMenuBarModel createCopy()
Siehe auch Jowidgets Nutzerhandbuch