public interface IMenuModel extends IItemModel, IMenuItemModel, IToolBarItemModel, IListModelObservable
Modifier and Type | Method and Description |
---|---|
IActionItemModel |
addAction(IAction action)
Creates an adds an action item and binds it to the given action
|
IActionItemModel |
addAction(int index,
IAction action)
Creates an adds an action item at a given index and binds it to the given action
|
IActionItemModel |
addActionItem()
Creates and adds a action item
|
IActionItemModel |
addActionItem(java.lang.String text)
Creates and adds a action item
|
IActionItemModel |
addActionItem(java.lang.String text,
IImageConstant icon)
Creates and adds a action item
|
IActionItemModel |
addActionItem(java.lang.String text,
java.lang.String toolTipText)
Creates and adds a action item
|
IActionItemModel |
addActionItem(java.lang.String text,
java.lang.String toolTipText,
IImageConstant icon)
Creates and adds a action item
|
void |
addAfter(IMenuItemModel newItem,
java.lang.String... idPath)
Adds an item after another item defined by an path of item id
If the given path not exists, an IllegalArgumentException will be thrown
|
void |
addBefore(IMenuItemModel newItem,
java.lang.String... idPath)
Adds an item before another item defined by an path of item id
If the given path not exists, an IllegalArgumentException will be thrown
|
ICheckedItemModel |
addCheckedItem()
Creates and adds a checked item
|
ICheckedItemModel |
addCheckedItem(java.lang.String text)
Creates and adds a checked item
|
ICheckedItemModel |
addCheckedItem(java.lang.String text,
IImageConstant icon)
Creates and adds a checked item
|
ICheckedItemModel |
addCheckedItem(java.lang.String text,
java.lang.String toolTipText)
Creates and adds a checked item
|
ICheckedItemModel |
addCheckedItem(java.lang.String text,
java.lang.String toolTipText,
IImageConstant icon)
Creates and adds a checked item
|
void |
addDecorator(IDecorator<IAction> decorator)
Adds an action decorator for all actions contained in this menu an all sub menus.
|
<MODEL_TYPE extends IMenuItemModel,BUILDER_TYPE extends IItemModelBuilder<?,MODEL_TYPE>> |
addItem(BUILDER_TYPE itemBuilder)
Adds an item defined by an builder and returns the build item
|
void |
addItem(IMenuItemModel item)
Adds an item to the model
|
<MODEL_TYPE extends IMenuItemModel,BUILDER_TYPE extends IItemModelBuilder<?,MODEL_TYPE>> |
addItem(int index,
BUILDER_TYPE itemBuilder)
Adds an item at a given index defined by an builder and returns the build item
|
void |
addItem(int index,
IMenuItemModel item)
Adds an item at a given index
|
void |
addItemsOfModel(IMenuModel menuModel)
Adds all items of a given model to this model
|
IMenuModel |
addMenu()
Creates and add a submenu
|
IMenuModel |
addMenu(java.lang.String text)
Creates and add a submenu
|
IMenuModel |
addMenu(java.lang.String text,
IImageConstant icon)
Creates and add a submenu
|
IMenuModel |
addMenu(java.lang.String text,
java.lang.String toolTipText)
Creates and add a submenu
|
IMenuModel |
addMenu(java.lang.String text,
java.lang.String toolTipText,
IImageConstant icon)
Creates and add a submenu
|
IRadioItemModel |
addRadioItem()
Creates and adds a radio item
|
IRadioItemModel |
addRadioItem(java.lang.String text)
Creates and adds a radio item
|
IRadioItemModel |
addRadioItem(java.lang.String text,
IImageConstant icon)
Creates and adds a radio item
|
IRadioItemModel |
addRadioItem(java.lang.String text,
java.lang.String toolTipText)
Creates and adds a radio item
|
IRadioItemModel |
addRadioItem(java.lang.String text,
java.lang.String toolTipText,
IImageConstant icon)
Creates and adds a radio item
|
ISeparatorItemModel |
addSeparator()
Creates and adds a separator
|
ISeparatorItemModel |
addSeparator(int index)
Creates and adds separator at a given index
|
ISeparatorItemModel |
addSeparator(java.lang.String id)
Creates and adds a separator
|
void |
bind(IMenuModel model)
Binds the given model to this model with the following manner:
1.
|
IMenuModel |
createCopy()
Creates a deep copy of the item and its children.
|
IMenuItemModel |
findItemByPath(java.lang.String... idPath)
Searches for an item in this model defined by a given path
|
java.util.List<IMenuItemModel> |
getChildren()
Gets a unmodifieable copy of the menus items
|
void |
removeAllItems()
Removes all items from the menu
|
void |
removeDecorator(IDecorator<IAction> decorator)
Removes a decorator for all actions contained in this menu an all sub menus.
|
void |
removeItem(IMenuItemModel item)
Removes an item from this menu
|
void |
removeItem(int index)
Removes an item at a given index
|
void |
unbind(IMenuModel model)
Unbind the given model.
|
getAccelerator, getIcon, getId, getMnemonic, getText, getToolTipText, isEnabled, isVisible, setAccelerator, setAccelerator, setEnabled, setIcon, setMnemonic, setMnemonic, setText, setToolTipText, setVisible
addItemModelListener, removeItemModelListener
addListModelListener, removeListModelListener
void addItem(IMenuItemModel item)
item
- The item to add, must not be nullvoid addItem(int index, IMenuItemModel item)
index
- The index to add the item atitem
- The item to add<MODEL_TYPE extends IMenuItemModel,BUILDER_TYPE extends IItemModelBuilder<?,MODEL_TYPE>> MODEL_TYPE addItem(BUILDER_TYPE itemBuilder)
itemBuilder
- The builder that defines the item<MODEL_TYPE extends IMenuItemModel,BUILDER_TYPE extends IItemModelBuilder<?,MODEL_TYPE>> MODEL_TYPE addItem(int index, BUILDER_TYPE itemBuilder)
index
- The index to add the item atitemBuilder
- The builder that defines the itemvoid addAfter(IMenuItemModel newItem, java.lang.String... idPath)
newItem
- The item to addidPath
- The path where to add the itemjava.lang.IllegalArgumentException
void addBefore(IMenuItemModel newItem, java.lang.String... idPath)
newItem
- The item to addidPath
- The path where to add the itemjava.lang.IllegalArgumentException
IActionItemModel addAction(IAction action)
action
- The action to useIActionItemModel addAction(int index, IAction action)
index
- The index to add the item ataction
- The action to useIActionItemModel addActionItem()
IActionItemModel addActionItem(java.lang.String text)
text
- The label text of the action itemIActionItemModel addActionItem(java.lang.String text, java.lang.String toolTipText)
text
- The label text of the action itemtoolTipText
- The tooltip text of the action itemIActionItemModel addActionItem(java.lang.String text, IImageConstant icon)
text
- The label text of the action itemicon
- The icon of the action itemIActionItemModel addActionItem(java.lang.String text, java.lang.String toolTipText, IImageConstant icon)
text
- The label text of the action itemtoolTipText
- The tooltip text of the action itemicon
- The icon of the action itemICheckedItemModel addCheckedItem()
ICheckedItemModel addCheckedItem(java.lang.String text)
text
- The label text of the itemICheckedItemModel addCheckedItem(java.lang.String text, java.lang.String toolTipText)
text
- The label text of the itemtoolTipText
- The tooltip text of the itemICheckedItemModel addCheckedItem(java.lang.String text, IImageConstant icon)
text
- The label text of the itemicon
- The icon of the itemICheckedItemModel addCheckedItem(java.lang.String text, java.lang.String toolTipText, IImageConstant icon)
text
- The label text of the itemtoolTipText
- The tooltip text of the itemicon
- The icon of the itemIRadioItemModel addRadioItem()
IRadioItemModel addRadioItem(java.lang.String text)
text
- The label text of the itemIRadioItemModel addRadioItem(java.lang.String text, java.lang.String toolTipText)
text
- The label text of the itemtoolTipText
- The tooltip text of the itemIRadioItemModel addRadioItem(java.lang.String text, IImageConstant icon)
text
- The label text of the itemicon
- The icon of the itemIRadioItemModel addRadioItem(java.lang.String text, java.lang.String toolTipText, IImageConstant icon)
text
- The label text of the itemtoolTipText
- The tooltip text of the itemicon
- The icon of the itemISeparatorItemModel addSeparator()
ISeparatorItemModel addSeparator(java.lang.String id)
id
- The id of the separatorISeparatorItemModel addSeparator(int index)
index
- The index where to add the separatorIMenuModel addMenu()
IMenuModel addMenu(java.lang.String text)
text
- The label text of the sub menuIMenuModel addMenu(java.lang.String text, java.lang.String toolTipText)
text
- The label text of the sub menutoolTipText
- The tooltip text of the submenuIMenuModel addMenu(java.lang.String text, IImageConstant icon)
text
- The label text of the sub menuicon
- The icon of the submenuIMenuModel addMenu(java.lang.String text, java.lang.String toolTipText, IImageConstant icon)
text
- The label text of the sub menutoolTipText
- The tooltip text of the submenuicon
- The icon of the submenuvoid addItemsOfModel(IMenuModel menuModel)
menuModel
- The model which items should be addedvoid addDecorator(IDecorator<IAction> decorator)
decorator
- The decorator to add, must not be nullvoid removeDecorator(IDecorator<IAction> decorator)
decorator
- The decorator to remove, must not be nullvoid removeItem(IMenuItemModel item)
item
- The item to remove, must not be nullvoid removeItem(int index)
index
- The index where to remove the itemvoid removeAllItems()
java.util.List<IMenuItemModel> getChildren()
IMenuItemModel findItemByPath(java.lang.String... idPath)
idPath
- The path of the items idsvoid bind(IMenuModel model)
model
- The model to bind this model tojava.lang.IllegalArgumentException
- if the given model is nullvoid unbind(IMenuModel model)
model
- the model to unbind, may be not bound already but must not be nulljava.lang.IllegalArgumentException
- if the given model is nullIMenuModel createCopy()
IItemModel
createCopy
in interface IItemModel
createCopy
in interface IMenuItemModel
Siehe auch Jowidgets Nutzerhandbuch