public interface IMenu extends IWidget, IMenuCommon
Modifier and Type | Method and Description |
---|---|
IActionMenuItem |
addAction(IAction action)
Adds an action item to the menu that will be bound to the given action
|
IActionMenuItem |
addAction(int index,
IAction action)
Adds an action item to the menu at a specific that will be bound to the given action
|
<WIDGET_TYPE extends IMenuItem> |
addItem(int index,
IWidgetDescriptor<? extends WIDGET_TYPE> descriptor)
Adds a menu item to the menu at a specific index
|
<WIDGET_TYPE extends IMenuItem> |
addItem(IWidgetDescriptor<? extends WIDGET_TYPE> descriptor)
Adds a menu item to the menu
|
IMenuItem |
addSeparator()
Adds a separator item to the menu
|
IMenuItem |
addSeparator(int index)
Adds a separator item to the menu at a specific index
|
java.util.List<IMenuItem> |
getChildren()
Gets the menu items of the menu as a unmodifieable copy
|
IMenuModel |
getModel()
Gets the model of the menu
|
boolean |
remove(IMenuItem item)
Removes a menu item form the menu
|
void |
removeAll()
Removes all items from the menu
|
void |
setModel(IMenuModel model)
Sets the model of the menu
|
dispose, getParent, getRoot, isDisposed
addDisposeListener, removeDisposeListener
getUiReference, isEnabled, setEnabled
addMenuListener, removeMenuListener
IMenuModel getModel()
void setModel(IMenuModel model)
model
- The model to set, must not be null<WIDGET_TYPE extends IMenuItem> WIDGET_TYPE addItem(IWidgetDescriptor<? extends WIDGET_TYPE> descriptor)
descriptor
- The descriptor for the item to add, must not be null<WIDGET_TYPE extends IMenuItem> WIDGET_TYPE addItem(int index, IWidgetDescriptor<? extends WIDGET_TYPE> descriptor)
index
- The index where to add the itemdescriptor
- The descriptor for the item to add, must not be nullIActionMenuItem addAction(IAction action)
action
- The action to add, must not be nullIActionMenuItem addAction(int index, IAction action)
index
- The index where to add the itemaction
- The action to add, must not be nullIMenuItem addSeparator()
IMenuItem addSeparator(int index)
index
- The index where to add the separarot itemboolean remove(IMenuItem item)
item
- The item to removevoid removeAll()
java.util.List<IMenuItem> getChildren()
Siehe auch Jowidgets Nutzerhandbuch