Menu

Kind of class:class
Inherits from:ScrollSelectList < ScrollView < View < UIComponent < UIObject < MovieClip
Classpath:mx.controls.Menu
File last modified:Tuesday, 18 December 2007, 15:44:37

Summary


Constructor
Class properties
Class properties inherited from ScrollSelectList
Class properties inherited from ScrollView
Class properties inherited from View
Class properties inherited from UIObject
Instance properties
Class methods
  • createMenu (parent, mdp, initObj)
    • Return the Menu instance described by the given MenuDataProvider, and
  • isItemEnabled (itm:Object) : Boolean
    • utilities for querying an item's state
  • isItemSelected (itm:Object) : Boolean
Class methods inherited from View
Class methods inherited from UIObject
Instance methods
Event handlers

Constructor

Class properties

mixit

static mixit:Boolean = TreeDataProvider.Initialize(XMLNode)
(read)

mixit2

static mixit2:Boolean = MenuDataProvider.Initialize(XMLNode)
(read)

symbolName

static symbolName:String = "Menu"
(read)

symbolOwner

static symbolOwner:Object = Menu
(read)

version

static version:String = "2.0.2.127"
(read)

Instance properties

__activator

__activator
(read)

__activeChildren

__activeChildren:Object
(read)

__anchor

__anchor:Number
(read)

__anchorIndex

__anchorIndex:Number
(read)

__closeDelay

__closeDelay:Number = 250
(read)

__delayQueue

__delayQueue:Array = new Array()
(read)

__enabled

__enabled:Boolean = true
(read)

__hScrollPolicy

__hScrollPolicy:String = "off"
(read)

__iconField

__iconField = "icon"
(read)

__lastRowRolledOver

__lastRowRolledOver:Number
(read)

__menuBar

__menuBar
(read)

__menuCache

__menuCache:Object
(read)

__menuDataProvider

__menuDataProvider:Object
(read)

__namedItems

__namedItems:Object
(read)

__openDelay

__openDelay:Number = 250
(read)

__parentMenu

__parentMenu:Menu
(read)

__radioGroups

__radioGroups:Object
(read)

__rowHeight

__rowHeight:Number = 19
(read)

__rowRenderer

__rowRenderer:String = "MenuRow"
(read)

__timeOut

__timeOut
(read)

__timer

__timer
(read)

__vScrollPolicy

__vScrollPolicy:String = "off"
(read)

__wasVisible

__wasVisible = false
(read)

_inherited_dataProvider

_inherited_dataProvider:Array
(read)

Component metadata:
    Bindable
    "XML"
    param1:
    "writeonly",type

    _members

    _members:Object
    (read)

    _selection

    _selection:Object
    (read)

    anchorRow

    anchorRow:Object
    (read)

    className

    className:String = "Menu"
    (read)

    invUpdateSize

    invUpdateSize:Boolean
    (read)

    popupMask

    popupMask:MovieClip
    (read)

    popupTween

    popupTween:Tween
    (read)

    supposedToLoseFocus

    supposedToLoseFocus:Boolean
    (read)

    wasJustCreated

    wasJustCreated:Boolean
    (read)

    Class methods

    createMenu

    static function createMenu (
    parent, mdp, initObj)

    Return the Menu instance described by the given MenuDataProvider, and
    place the instance in the given parent container.
    Parameters:
    parent:
    the container
    mdp :
    a MenuDataProvider to base the menu on
    Returns:
    • a Menu instance, already placed inside the parent, but invisible

    isItemEnabled

    static function isItemEnabled (
    itm:Object) : Boolean

    utilities for querying an item's state

    isItemSelected

    static function isItemSelected (
    itm:Object) : Boolean

    Instance methods

    __onMouseUp

    function __onMouseUp (
    )

    addMenuItem

    function addMenuItem (
    arg:Object) : Object

    Append a menu item at the end of this menu.
    Parameters:
    arg:
    may be either (1) a String (to be used as the item's label),
    (2) an Object (whose properties will be copied into the resulting XMLNode's
    attributes), (3) an XMLNode (used directly), or (4) 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 a menu item into this menu.
    Parameters:
    index:
    the index where the item should be inserted
    arg :
    may be either (1) a String (to be used as the item's label),
    (2) an Object (whose properties will be copied into the resulting XMLNode's
    attributes), (3) an XMLNode (used directly), or (4) an XML instance whose
    firstChild will be cloned and used.
    Returns:
    • an XMLNode carrying a representation of the menu item's state

    calcHeight

    private function calcHeight (
    ) : Number

    calcWidth

    private function calcWidth (
    ) : Number

    callMenuDelay

    function callMenuDelay (
    request:String, args:Object) : Void

    callTimeOut

    function callTimeOut (
    Void) : Void

    cancelMenuDelay

    function cancelMenuDelay (
    Void) : Void

    clearMenuDelay

    function clearMenuDelay (
    Void) : Void

    clearTimeOut

    function clearTimeOut (
    Void) : Void

    closeSubMenu

    function closeSubMenu (
    o:Object) : Void

    createChildren

    function createChildren (
    Void) : Void

    Child construction

    deinstallAllItems

    private function deinstallAllItems (
    Void) : Void

    Clear out the named and radio-group items from this context

    deinstallItem

    private function deinstallItem (
    item:Object) : Void

    Scan the given Object (an XMLNode) for sub-elements containing named
    items and radio items. For named items, remove the previously-added
    properties from the root Menu object that refer to them. For radio
    items, remove them from the implied radio-group.

    deleteDependentSubMenus

    private function deleteDependentSubMenus (
    menuItem:Object)

    draw

    function draw (
    Void) : Void

    getDataProvider

    function getDataProvider (
    ) : Object

    getGroupSelection

    function getGroupSelection (
    )

    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

    getRootMenu

    function getRootMenu (
    Void) : Menu

    Climb up and find the root menu

    hide

    function hide (
    Void) : Void

    If the Menu is visible, hide it and any visible submenus.

    hideAllMenus

    function hideAllMenus (
    Void)

    indexOf

    function indexOf (
    item:Object) : Number

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

    init

    function init (
    Void) : Void

    Generic initializer

    installItem

    private function installItem (
    item:Object) : Void

    Install support structures for named items and radio-groups.
    For named items, add properties to the root Menu object that
    refer to them. For radio items, add them to the implied
    radio-group. Do the same for sub-items.

    invalidateStyle

    function invalidateStyle (
    propName:String) : Void

    isMouseOverMenu

    function isMouseOverMenu (
    Void)

    keyDown

    function keyDown (
    e:Object) : Void

    modelChanged

    function modelChanged (
    eventObj)

    moveSelBy

    function moveSelBy (
    incr:Number) : Void

    notifyStyleChangeInChildren

    function notifyStyleChangeInChildren (
    sheetName, styleProp, newValue) : Void

    openSubMenu

    function openSubMenu (
    o:Object) : Void

    propagateToSubMenus

    function propagateToSubMenus (
    prop:String, value)

    removeAll

    function removeAll (
    Void) : Object

    Remove all items from the menu.

    removeMenuItem

    function removeMenuItem (
    item:Object) : Object

    Remove an item from the menu. If it doesn't belong to this Menu,
    then do nothing and return undefined.
    Parameters:
    item:
    the item to be removed
    Returns:
    • a reference to the XMLNode that was removed, or undefined
      if the given item does not belong to this Menu instance.

    removeMenuItemAt

    function removeMenuItemAt (
    index:Number) : Object

    Remove the item at a given index from the menu. If there's no item
    at the given index, then do nothing and return undefined.
    Parameters:
    index:
    the index of the item to be removed
    Returns:
    • a reference to the XMLNode that was removed (if any)

    runDelayQueue

    function runDelayQueue (
    Void) : Void

    setCellRenderer

    function setCellRenderer (
    cR) : Void

    setDataProvider

    function setDataProvider (
    dP) : Void

    setGroupSelection

    function setGroupSelection (
    item)

    setIconField

    function setIconField (
    v:String) : Void

    setIconFunction

    function setIconFunction (
    v:Function) : Void

    setLabelField

    function setLabelField (
    lbl:String)

    setLabelFunction

    function setLabelFunction (
    lbl:Function)

    setMenuDelay

    function setMenuDelay (
    delay:Number, request:String, args:Object) : Void

    Interval functions used to delay submenu tasks

    setMenuDelay - sets the interval timer or defers to queue
    callMenuDelay - calls the delayed function and signals to clear the interval
    clearMenuDelay - clears the interval and checks the queue for more tasks
    cancelMenuRequest - cancels last request and removes it from the queue
    runDelayQueue - cycles through delayed tasks
    setTimeOut - sets a timer to test for out of bounds cursor movement
    clearTimeOut - clears timeout interval
    callTimeOut - checks if cursor is out of bounds from branch item

    openSubMenu - opens a submenu after the specified delay time
    closeSubMenu - closes a submenu(s) after the specified delay time

    setMenuItemEnabled

    function setMenuItemEnabled (
    item:Object, enable:Boolean) : Void

    Mark a menu item as 'enabled' (or not), and notify listeners.
    Parameters:
    item :
    the target item
    enable:
    a boolean indicating whether the item is enabled or not

    setMenuItemSelected

    function setMenuItemSelected (
    item:Object, select:Boolean) : Void

    Mark a menu item as 'selected' (or not), and notify listeners.
    Parameters:
    item :
    the target item
    select:
    a boolean indicating whether the item is selected or not

    setRowHeight

    function setRowHeight (
    v:Number) : Void

    setTimeOut

    function setTimeOut (
    delay:Number, id:Number) : Void

    show

    function show (
    x:Number, y:Number) : Void

    If the Menu isn't presently visible, place the top-left corner
    at the given coordinates within the parent, resize the menu as
    needed, and make it visible. This method also fires a "show"
    event to all listeners.
    Parameters:
    x:
    (optional) the horizontal location of the top-left corner
    y:
    (optional) the vertical location of the top-left corner

    size

    function size (
    Void) : Void

    updateSize

    private function updateSize (
    ) : Void

    Event handlers

    onKillFocus

    function onKillFocus (
    )

    onRowDragOver

    function onRowDragOver (
    rowIndex:Number) : Void

    onRowPress

    function onRowPress (
    rowIndex:Number) : Void

    onRowRelease

    function onRowRelease (
    rowIndex:Number) : Void

    onRowRollOut

    function onRowRollOut (
    rowIndex:Number) : Void

    onRowRollOver

    function onRowRollOver (
    rowIndex:Number) : Void

    onSetFocus

    function onSetFocus (
    )

    onTweenEnd

    function onTweenEnd (
    val:Array) : Void

    onTweenUpdate

    function onTweenUpdate (
    val:Array) : Void