public class MenuBarModel extends java.lang.Object implements IMenuBarModel
Constructor and Description |
---|
MenuBarModel() |
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
|
void |
addListModelListener(IListModelListener listener)
Adds a list model listener
|
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.
|
static IMenuBarModel |
create()
Creates a new menu bar model
|
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 |
removeListModelListener(IListModelListener listener)
removes a list model listener
|
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.
|
public final void addListModelListener(IListModelListener listener)
IListModelObservable
addListModelListener
in interface IListModelObservable
listener
- The listener to addpublic final void removeListModelListener(IListModelListener listener)
IListModelObservable
removeListModelListener
in interface IListModelObservable
listener
- The listener to removepublic final void addAfter(IMenuModel newMenu, java.lang.String id)
IMenuBarModel
addAfter
in interface IMenuBarModel
newMenu
- The menu to addid
- The id of the menu to add the newMenu afterpublic final void addBefore(IMenuModel newMenu, java.lang.String id)
IMenuBarModel
addBefore
in interface IMenuBarModel
newMenu
- The menu to addid
- The id of the menu to add the newMenu beforepublic final void bind(IMenuBarModel model)
IMenuBarModel
bind
in interface IMenuBarModel
model
- The model to bind this model topublic final void unbind(IMenuBarModel model)
IMenuBarModel
unbind
in interface IMenuBarModel
model
- the model to unbind, may be not bound already but must not be nullpublic final void addMenusOfModel(IMenuBarModel model)
IMenuBarModel
addMenusOfModel
in interface IMenuBarModel
model
- The menu bar which models should be addedpublic final void addMenu(IMenuModel menu)
IMenuBarModel
addMenu
in interface IMenuBarModel
menu
- The menu to addpublic final void addMenu(int index, IMenuModel menu)
IMenuBarModel
addMenu
in interface IMenuBarModel
index
- The index where to add the menumenu
- The menu to addpublic final IMenuModel addMenu(IMenuModelBuilder menuBuilder)
IMenuBarModel
addMenu
in interface IMenuBarModel
menuBuilder
- The builder that defines the menupublic final IMenuModel addMenu(int index, IMenuModelBuilder menuBuilder)
IMenuBarModel
addMenu
in interface IMenuBarModel
index
- The index where to add the menumenuBuilder
- The builder that defines the menupublic final IMenuModel addMenu()
IMenuBarModel
addMenu
in interface IMenuBarModel
public final IMenuModel addMenu(java.lang.String text)
IMenuBarModel
addMenu
in interface IMenuBarModel
text
- The label text of the menupublic final IMenuModel addMenu(java.lang.String text, java.lang.String toolTipText)
IMenuBarModel
addMenu
in interface IMenuBarModel
text
- The label text of the menutoolTipText
- The tooltip text of the menupublic final IMenuModel addMenu(java.lang.String text, IImageConstant icon)
IMenuBarModel
addMenu
in interface IMenuBarModel
text
- The label text of the menuicon
- The icon of the menupublic final IMenuModel addMenu(java.lang.String text, java.lang.String toolTipText, IImageConstant icon)
IMenuBarModel
addMenu
in interface IMenuBarModel
text
- The label text of the menutoolTipText
- The tooltip text of the menuicon
- The icon of the menupublic final void removeMenu(IMenuModel item)
IMenuBarModel
removeMenu
in interface IMenuBarModel
item
- The menu to removepublic final void removeMenu(int index)
IMenuBarModel
removeMenu
in interface IMenuBarModel
index
- The index where to remove the menupublic final void removeAllMenus()
IMenuBarModel
removeAllMenus
in interface IMenuBarModel
public final IMenuModel findMenuById(java.lang.String id)
IMenuBarModel
findMenuById
in interface IMenuBarModel
id
- The id of the menu to search forpublic final java.util.List<IMenuModel> getMenus()
IMenuBarModel
getMenus
in interface IMenuBarModel
public IMenuBarModel createCopy()
IMenuBarModel
createCopy
in interface IMenuBarModel
public static IMenuBarModel create()
Siehe auch Jowidgets Nutzerhandbuch