MenuDataProvider

Kind of class:class
Inherits from:Object
Classpath:mx.controls.menuclasses.MenuDataProvider
File last modified:Tuesday, 18 December 2007, 15:44:38

Summary


Constructor
Class properties
Instance properties
Class methods
Instance methods
  • addMenuItem (arg:Object) : Object
    • Add an item to this item's submenu.
  • addMenuItemAt (index:Number, arg:Object) : Object
    • Insert an item into this item's submenu.
  • removeMenuItem (Void) : Object
    • Remove this item from it's parent.
  • removeMenuItemAt (index:Number) : Object
    • Remove an item from this item's submenu.
  • getMenuItemAt (index:Number) : Object
    • Retrieve a menu item from this menu
  • indexOf (item:Object) : Number
    • Return the index of the given item within this item's submenu.

Constructor

Class properties

mixinProps

static mixinProps:Array = ["addMenuItem", "addMenuItemAt",
(read)

mixins

static mixins:MenuDataProvider = new MenuDataProvider()
(read)

Instance properties

addTreeNode

addTreeNode:Function
(read)

Accessible when mixed-in with TreeDataProvider

addTreeNodeAt

addTreeNodeAt:Function
(read)

attributes

attributes:Object
(read)

Accessible when mixed-in with XMLNode

childNodes

childNodes:Array
(read)

getTreeNodeAt

getTreeNodeAt:Function
(read)

parentNode

parentNode:Object
(read)

removeTreeNode

removeTreeNode:Function
(read)

removeTreeNodeAt

removeTreeNodeAt:Function
(read)

Class methods

Initialize

static function Initialize (
obj:Object) : Boolean

Instance methods

addMenuItem

function addMenuItem (
arg:Object) : Object

Add an item to this item's submenu. If this is the first item added,
then the necessary structures will be created to support a submenu.
Parameters:
arg:
may be either (1) an Object (whose properties will be copied
into the resulting XMLNode's attributes), (2) an XMLNode (used directly),
or (3) an XML instance whose firstChild will be cloned and used.
Returns:
  • an XMLNode carrying a representation of the menu item's state

addMenuItemAt

function addMenuItemAt (
index:Number, arg:Object) : Object

Insert an item into this item's submenu. If the index is invalid,
then this call will be ignored.
Parameters:
index:
the index where the item should be inserted
arg :
may be either (1) an Object (whose properties will be copied
into the resulting XMLNode's attributes), (2) an XMLNode (used directly),
or (3) an XML instance whose firstChild will be cloned and used.
Returns:
  • an XMLNode carrying a representation of the menu item's state

getMenuItemAt

function getMenuItemAt (
index:Number) : Object

Retrieve a menu item from this menu
Parameters:
index:
the index of the item to be retrieved
Returns:
  • a reference to the XMLNode that was removed

indexOf

function indexOf (
item:Object) : Number

Return the index of the given item within this item's submenu. If
the target item does not belong to this item's submenu, then return
undefined.
Parameters:
item:
the target item
Returns:
  • the index of the given item, or undefined

removeMenuItem

function removeMenuItem (
Void) : Object

Remove this item from it's parent.
Returns:
  • a reference to the XMLNode that was removed

removeMenuItemAt

function removeMenuItemAt (
index:Number) : Object

Remove an item from this item's submenu.
Parameters:
index:
the index of the item to be removed
Returns:
  • a reference to the XMLNode that was removed