MenuBar
| Kind of class: | class |
|---|---|
| Inherits from: | UIComponent < UIObject < MovieClip |
| Classpath: | mx.controls.MenuBar |
| File last modified: | Tuesday, 18 December 2007, 15:44:37 |
MenuBar class
- extends UIComponent
- gives the user the ability to select an option from a menu within a series of menus
- extends UIComponent
- gives the user the ability to select an option from a menu within a series of menus
Summary
Constructor
Class properties
- symbolName : String
- symbolOwner : Object
- version : String
- _s_MenuIndex
Class properties inherited from UIComponent
Class properties inherited from UIObject
Instance properties
- className : String
- __labels : Array
- __menuBarItems : Array
- __menus : Object
- __menuDataProvider : Object
- topItemDepth : Number
- openMenuIndex : Number
- isDown
- boundingBox_mc : MovieClip
- background_mc : MovieClip
- mask_mc : MovieClip
- menuBarBackLeftName : String
- menuBarBackRightName : String
- menuBarBackMiddleName : String
- __selectFirstItem
- __backgroundWidth
- __marginWidth
- __menuEventHandler : Object
- invUpdateDisplay : Boolean
- invUpdateSize : Boolean
- tabChildren : Boolean
- enableByPass : Boolean
- supposedToLoseFocus : Boolean
- labelField : String
- labelFunction : Function
- clipParameters : Object
- rebroadcastEvents : Object
- dataProvider : Object
- labels : Array
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
Class methods inherited from UIObject
Instance methods
- init (Void) : Void
- Generic initializer
- draw (Void) : Void
- handleEvent (event)
- createChildren (Void) : Void
- size (Void) : Void
- addMenu (arg1, arg2) : Menu
- Append a menu and activator at the end of this menubar.
- addMenuAt (index, arg1, arg2)
- Insert a menu and activator into the menubar.
- insertMenuBarItem (index, mdp)
- getMenuAt (index) : Menu
- Return the menu at the given index
- removeMenuAt (index)
- Remove the menu at the given index
- setEnabled (b:Boolean) : Void
- setMenuEnabledAt (index, enable)
- Enable/disable a menu
- getMenuEnabledAt (index)
- Return the enabled status of a menu
- setDataProvider (dp)
- Load the state from the given XMLNode object
- invalidateStyle (propName:String) : Void
- changeColorStyleInChildren (sheet, styleProp:String, newValue) : Void
- notifyStyleChangeInChildren (sheet, styleProp:String, newValue)
- updateDisplay (resize:Boolean) : Void
- updateBackgroundDisplay
- showMenu (index:Number) : Void
- removeMenuBarItemAt (index)
- removeAll
- keyDown (e:Object) : Void
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
- onKillFocus
- onItemRollOver (index:Number) : Void
- onItemPress (index:Number) : Void
- onItemRelease (index:Number)
- onItemRollOut (index:Number)
- onItemDragOver (index:Number)
- onItemDragOut (index:Number)
Event handlers inherited from UIComponent
Constructor
MenuBar
function MenuBar (
)
Class properties
_s_MenuIndex
static _s_MenuIndex = 0
(read)
symbolName
static symbolName:String = "MenuBar"
(read)
symbolOwner
static symbolOwner:Object = MenuBar
(read)
version
static version:String = "2.0.2.127"
(read)
Instance properties
__backgroundWidth
__backgroundWidth = 550
(read)
__labels
__labels:Array
(read)
__marginWidth
__marginWidth = 10
(read)
__selectFirstItem
__selectFirstItem
(read)
background_mc
background_mc:MovieClip
(read)
boundingBox_mc
boundingBox_mc:MovieClip
(read)
className
className:String = "MenuBar"
(read)
clipParameters
clipParameters:Object = { enabled:1, visible:1, labels:1, minWidth:1, minHeight:1}
(read)
dataProvider
dataProvider:Object
(read,write)
Component metadata:
| Bindable | "XML" param1: "writeonly",type |
|---|
enableByPass
enableByPass:Boolean
(read)
invUpdateDisplay
invUpdateDisplay:Boolean
(read)
invUpdateSize
invUpdateSize:Boolean
(read)
isDown
isDown
(read)
labelField
labelField:String = "label"
(read)
labelFunction
labelFunction:Function
(read)
labels
labels:Array
(read,write)
Component metadata:
| Inspectable | defaultValue: "" |
|---|
mask_mc
mask_mc:MovieClip
(read)
openMenuIndex
openMenuIndex:Number
(read)
rebroadcastEvents
rebroadcastEvents:Object = { menuHide:1, menuShow:1, rollOver:1, rollOut:1, change:1 }
(read)
supposedToLoseFocus
supposedToLoseFocus:Boolean
(read)
tabChildren
tabChildren:Boolean = false
(read)
topItemDepth
topItemDepth:Number = 200
(read)
Instance methods
addMenu
Append a menu and activator at the end of this menubar.
Parameters:
arg1:
may be either (1) a String (to be used as the item's label), (2) or an xmlNode
arg2:
may be either (1) undefined, (2) a menu, (3) or an xml/xmlNode
Returns:
- Return the reference to the new Menu.
addMenuAt
function addMenuAt (
index,
arg1,
arg2)
Insert a menu and activator into the menubar.
Parameters:
index:
the index where the menu should be inserted
arg1 :
may be either (1) a String (to be used as the item's label), (2) or an xmlNode
arg2 :
may be either (1) undefined, (2) a menu, (3) or an xml/xmlNode
Returns:
- Return the reference to the new Menu.
changeColorStyleInChildren
function changeColorStyleInChildren (
sheet,
styleProp:String,
newValue) : Void
getMenuAt
Return the menu at the given index
Parameters:
index:
the index of the menu instance to return
Returns:
- a reference to the menu at that specified index
getMenuEnabledAt
function getMenuEnabledAt (
index)
Return the enabled status of a menu
Parameters:
index:
the index of the menu instance
Returns:
- a Boolean of the enabled state of the specified menu
handleEvent
function handleEvent (
event)
insertMenuBarItem
private function insertMenuBarItem (
index,
mdp)
invalidateStyle
function invalidateStyle (
propName:String) : Void
keyDown
function keyDown (
e:Object) : Void
notifyStyleChangeInChildren
function notifyStyleChangeInChildren (
sheet,
styleProp:String,
newValue)
removeAll
private function removeAll (
)
removeMenuAt
function removeMenuAt (
index)
Remove the menu at the given index
Parameters:
index:
the index of the menu instance to remove
Returns:
- a reference to the menu that was removed
removeMenuBarItemAt
function removeMenuBarItemAt (
index)
setDataProvider
function setDataProvider (
dp)
Load the state from the given XMLNode object
setEnabled
function setEnabled (
b:Boolean) : Void
setMenuEnabledAt
function setMenuEnabledAt (
index,
enable)
Enable/disable a menu
Parameters:
index:
the index of the menu instance to enable
menu :
the Menu instance to remove
showMenu
function showMenu (
index:Number) : Void
updateBackgroundDisplay
function updateBackgroundDisplay (
)
updateDisplay
function updateDisplay (
resize:Boolean) : Void
Event handlers
onItemDragOut
function onItemDragOut (
index:Number)
onItemDragOver
function onItemDragOver (
index:Number)
onItemPress
function onItemPress (
index:Number) : Void
onItemRelease
function onItemRelease (
index:Number)
onItemRollOut
function onItemRollOut (
index:Number)
onItemRollOver
function onItemRollOver (
index:Number) : Void
onKillFocus
function onKillFocus (
)
onSetFocus
function onSetFocus (
)