- Top
- Summary
- Constructors
- Class properties
- Instance properties
- Class methods
- Instance methods
- Event handlers
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
- symbolName : String
- symbolOwner : Object
- version : String
- mixit : Boolean
- mixit2 : Boolean
Class properties inherited from ScrollSelectList
Class properties inherited from ScrollView
Class properties inherited from View
Class properties inherited from UIComponent
Class properties inherited from UIObject
Instance properties
- className : String
- __hScrollPolicy : String
- __vScrollPolicy : String
- __rowRenderer : String
- __rowHeight : Number
- __menuDataProvider : Object
- __wasVisible
- __menuBar
- __activator
- __parentMenu : Menu
- __menuCache : Object
- __namedItems : Object
- __radioGroups : Object
- __enabled : Boolean
- __openDelay : Number
- __closeDelay : Number
- __delayQueue : Array
- __timer
- __timeOut
- __anchor : Number
- __anchorIndex : Number
- __activeChildren : Object
- anchorRow : Object
- __lastRowRolledOver : Number
- menuBarIndex : Number
- popupTween : Tween
- popupMask : MovieClip
- __iconField
- invUpdateSize : Boolean
- supposedToLoseFocus : Boolean
- wasJustCreated : Boolean
- _selection : Object
- _members : Object
- _inherited_dataProvider : Array
Instance properties inherited from ScrollSelectList
__cellRenderer __dataProvider __hPosition __iconField __iconFunction __labelField __labelFunction __rowCount __rowHeight __rowRenderer __width addItem addItemAt baseRowZ calcPreferredWidth cellRenderer changeFlag className clearSelected CONTENTDEPTH createLabel dataProvider dragEnabled dragScrolling dropEnabled enabled getDataProvider getItemAt getLength getSelectedIndex getSelectedIndices getSelectedItem getSelectedItems getValue iconField iconField iconFunction iconFunction invLayoutContent invRowHeight invUpdateControl isPressed isRowStyle isSelected labelField labelField labelFunction labelFunction lastPosition lastSelected lastSelID layoutX layoutY length listContent minScrollInterval modelChanged multipleSelection onMouseUp propertyTable removeAll removeItemAt replaceItemAt roundUp rowCount rowCount rowHeight rowHeight rows scrollInterval selectable selected selectedIndex selectedIndices selectedItem selectedItems selectHolder selectionDeleted selectItem setDataProvider setSelectedIndex setSelectedIndices sortItems sortItemsBy tempLabel tH topRowZ tW value wasKeySelected
Instance properties inherited from ScrollView
__hPosition __hScrollPolicy __maxHPosition __viewMetrics __vPosition __vScrollPolicy className columnWidth heightPadding hPosition hScroller hScrollPolicy invLayout MASK_DEPTH mask_mc maxHPosition maxVPosition numberOfCols oldRndUp owner propsInited rowC rowH scrollAreaChanged specialHScrollCase viewableColumns viewableRows vPosition vScroller vScrollPolicy vScrollPolicy widthPadding
Instance properties inherited from View
Instance properties inherited from UIComponent
Instance properties inherited from UIObject
__height __onUnload __width _color _endInit _id _maxHeight _maxWidth _minHeight _minWidth _preferredHeight _preferredWidth _tf _topmost addEventListener bottom buildDepthTable changeColorStyleInChildren changeTextStyleInChildren childrenCreated className clipParameters color createAccessibilityImplementation createChildAtDepth createClassChildAtDepth createEvent dispatchEvent embedFonts findNextAvailableDepth fontFamily fontSize fontStyle fontWeight handleEvent height idNames ignoreClassStyleDeclaration initProperties invalidateFlag left lineColor lineWidth marginLeft marginRight methodTable minHeight minWidth notifyStyleChangeInChildren removeEventListener right scaleX scaleY setStyle stylecache styleName tabEnabled textAlign textDecoration textIndent tfList top validateNow visible width x y
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 UIObject
Instance methods
- init (Void) : Void
- Generic initializer
- createChildren (Void) : Void
- Child construction
- propagateToSubMenus (prop:String, value)
- setLabelField (lbl:String)
- setLabelFunction (lbl:Function)
- setCellRenderer (cR) : Void
- setRowHeight (v:Number) : Void
- setIconField (v:String) : Void
- setIconFunction (v:Function) : Void
- size (Void) : Void
- draw (Void) : Void
- setDataProvider (dP) : Void
- getDataProvider : Object
- addMenuItem (arg:Object) : Object
- Append a menu item at the end of this menu.
- addMenuItemAt (index:Number, arg:Object) : Object
- Insert a menu item into this menu.
- removeMenuItemAt (index:Number) : Object
- Remove the item at a given index from the menu.
- removeMenuItem (item:Object) : Object
- Remove an item from the menu.
- removeAll (Void) : Object
- Remove all items from the menu.
- getMenuItemAt (index:Number) : Object
- Retrieve a menu item from this menu
- setMenuItemSelected (item:Object, select:Boolean) : Void
- Mark a menu item as 'selected' (or not), and notify listeners.
- setMenuItemEnabled (item:Object, enable:Boolean) : Void
- Mark a menu item as 'enabled' (or not), and notify listeners.
- indexOf (item:Object) : Number
- Return the index of the given item within this menu.
- show (x:Number, y:Number) : Void
- If the Menu isn't presently visible, place the top-left corner
- hide (Void) : Void
- If the Menu is visible, hide it and any visible submenus.
- modelChanged (eventObj)
- updateSize : Void
- calcWidth : Number
- calcHeight : Number
- invalidateStyle (propName:String) : Void
- notifyStyleChangeInChildren (sheetName, styleProp, newValue) : Void
- deleteDependentSubMenus (menuItem:Object)
- installItem (item:Object) : Void
- Install support structures for named items and radio-groups.
- deinstallItem (item:Object) : Void
- Scan the given Object (an XMLNode) for sub-elements containing named
- deinstallAllItems (Void) : Void
- Clear out the named and radio-group items from this context
- getGroupSelection
- setGroupSelection (item)
- __onMouseUp
- setMenuDelay (delay:Number, request:String, args:Object) : Void
- Interval functions used to delay submenu tasks
- callMenuDelay (request:String, args:Object) : Void
- clearMenuDelay (Void) : Void
- cancelMenuDelay (Void) : Void
- runDelayQueue (Void) : Void
- setTimeOut (delay:Number, id:Number) : Void
- clearTimeOut (Void) : Void
- callTimeOut (Void) : Void
- openSubMenu (o:Object) : Void
- closeSubMenu (o:Object) : Void
- moveSelBy (incr:Number) : Void
- keyDown (e:Object) : Void
- hideAllMenus (Void)
- isMouseOverMenu (Void)
- getRootMenu (Void) : Menu
- Climb up and find the root menu
Instance methods inherited from ScrollSelectList
__onMouseUp createChildren dragScroll draw findInputText findString getPropertiesAt getPropertiesOf getRowCount getRowHeight getStateAt getStyle init invalidateStyle keyDown layoutContent moveSelBy onRowDragOut onRowDragOver onRowPress onRowRelease onRowRollOut onRowRollOver selectRow setCellRenderer setEnabled setIconField setIconFunction setLabelField setLabelFunction setPropertiesAt setRowCount setRowHeight setVPosition updateControl
Instance methods inherited from ScrollView
__onMouseWheel childLoaded createChild createChildren doLayout draw getHPosition getHScrollPolicy getMaxHPosition getViewMetrics getVPosition getVScrollPolicy init invalidate onScroll scrollProxy setEnabled setHPosition setHScrollPolicy setMaxHPosition setScrollProperties setVPosition setVScrollPolicy size
Instance methods inherited from View
Instance methods inherited from UIObject
__getTextFormat _createChildren _getTextFormat cancelAllDoLaters constructObject createChildren createClassObject createEmptyObject createLabel createObject createSkin destroyObject doLater doLaterDispatcher draw drawRect getClassStyleDeclaration getMinHeight getMinWidth getSkinIDName getStyle getStyleName init initFromClipParameters invalidate invalidateStyle move redraw setColor setMinHeight setMinWidth setSize setSkin setVisible size
Event handlers
- onSetFocus
- onTweenUpdate (val:Array) : Void
- onTweenEnd (val:Array) : Void
- onKillFocus
- onRowRelease (rowIndex:Number) : Void
- onRowPress (rowIndex:Number) : Void
- onRowRollOut (rowIndex:Number) : Void
- onRowRollOver (rowIndex:Number) : Void
- onRowDragOver (rowIndex:Number) : Void
Event handlers inherited from ScrollSelectList
Event handlers inherited from ScrollView
Event handlers inherited from UIComponent
Constructor
Menu
function Menu (
)
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)
__namedItems
__namedItems:Object
(read)
__openDelay
__openDelay:Number = 250
(read)
__parentMenu
__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
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.
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.
(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.
(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.
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)
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
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.
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.
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.
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.
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
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.
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
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