Main Page | Packages | Class Tree | Index | Help

mx.controls.menuclasses

class MenuDataProvider

Object
  |
  +--mx.controls.menuclasses.MenuDataProvider


class MenuDataProvider
extends Object

XMLNode Mix-in Methods (MenuDataProvider methods) nig 05.26.03 To get the functionality we want out of the XML object, a few methods need to be mixed directly onto XMLNode, since the XML object is composed of XMLNode objects.

The methods will allow the user to create specialized XML for displaying popup menus



Field Summary


addTreeNode: Function
Accessible when mixed-in with TreeDataProvider


addTreeNodeAt: Function



attributes: Object
Accessible when mixed-in with XMLNode


childNodes: Array



getTreeNodeAt: Function


static
mixinProps: Array
Mixin support

static
mixins: MenuDataProvider



parentNode: Object



removeTreeNode: Function



removeTreeNodeAt: Function


Fields inherited from class Object

__proto__, constructor, prototype

Constructor


MenuDataProvider ( )


Method Summary


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.


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.

static
Initialize ( obj: Object ): Boolean
Initialize is called to apply the mixinProps above to the given object's prototype.


removeMenuItem ( Void ): Object
Remove this item from it's parent.


removeMenuItemAt ( index: Number ): Object
Remove an item from this item's submenu.

Methods inherited from class Object

addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toLocaleString, toString, unwatch, valueOf, watch



Field Documentation

addTreeNode

var addTreeNode: Function
Accessible when mixed-in with TreeDataProvider

addTreeNodeAt

var addTreeNodeAt: Function

attributes

var attributes: Object
Accessible when mixed-in with XMLNode

childNodes

var childNodes: Array

getTreeNodeAt

var getTreeNodeAt: Function

mixinProps

static var mixinProps: Array
Mixin support

mixins

static var mixins: MenuDataProvider

parentNode

var parentNode: Object

removeTreeNode

var removeTreeNode: Function

removeTreeNodeAt

var removeTreeNodeAt: Function

Constructor Documentation

MenuDataProvider

function MenuDataProvider()

Method Documentation

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
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
item the target item
Returns:
the index of the given item, or undefined

Initialize

static function Initialize(obj: Object): Boolean
Initialize is called to apply the mixinProps above to the given object's prototype.

Typical usage : MenuDataProvider.Initialize(XMLNode);

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


The documentation was generated from the following file:


Copyright © 1997-2005 Macromedia, Inc. All rights reserved. Generated with AS2Doc