Extras.ItemModel
Extras.MenuModel
Constructor Summary | |
---|---|
Public | Extras.MenuModel() Creates a new menu model |
Instance Field Summary | |
---|---|
Public | text The menu title text. |
Public | icon The menu icon. |
Public | items The child menu items, an array of ItemModel s.
|
Instance Method Summary | |
---|---|
Public | addItem() Adds an item to the MenuModel. |
Public | findItem() Finds an item by id in the MenuModel , searching descendant MenuModel s as necessary.
|
Public | getItemModelFromPositions() Returns the ItemModel at a specific path within this menu model.
|
Public | indexOfItem() Determines the index of the specified menu item. |
Public | toString() |
modelId
(String)
- the id of the menu modeltext
(String)
- the title text of the menu model which will appear in its
parent menu when this menu is used as a submenuicon
(#ImageReference)
- the icon of the menu model which will appear in its
parent menu when this menu is used as a submenuitems
(Array)
- the child menu items, an array of ItemModel
s
(optional)item
(Extras.ItemModel)
- the item (must be a MenuModel, OptionModel, or SeparatorModel.MenuModel
, searching descendant MenuModel
s as necessary.
id
- the id of the menu item to findItemModel
at a specific path within this menu model.
itemPositions
(Array)
- array of integers describing path, e.g., [0,1,2] would
indicate the third item in the second item in the first item in this menu model.item
(Extras.ItemModel)
- the item to find