Attributes | Name and Description |
---|---|
|
caplin.menu.model.Menu(String label, type)
|
Attributes | Name and Description |
---|---|
|
void
add(Variant item)
Allows you to add either a single item or an array of items to the menu. |
|
Object
get(Number index)
Returns the item in the given position. |
|
Array
getAll()
Returns a copy of the list of all menu items in this menu. |
|
void
insertAt(Number index, Object item)
Inserts an item in the given position. |
|
void
remove(Number index)
Removes an item from the specified index. |
|
void
removeAll()
Removes all the items inside the menu. |
►
caplin.menu.model.Menu(String label, type)
String | label | Label to be displayed if the menu is a sub menu item. |
type |
►
void
add(Variant item)
Allows you to add either a single item or an array of items to the menu. This item(s) must implement the caplin.menu.model.Item class.
Variant | item | The array of items or the single item that needs to be added. |
►
Object
get(Number index)
Returns the item in the given position.
Number | index | The item index. |
►
Array
getAll()
Returns a copy of the list of all menu items in this menu.
►
void
insertAt(Number index, Object item)
Inserts an item in the given position.
Number | index | The index in which the item will be inserted. |
Object | item | The item to be inserted. |
►
void
remove(Number index)
Removes an item from the specified index.
Number | index | The index from which the item will be removed. |
►
void
removeAll()
Removes all the items inside the menu.