Packageardisia.components.flexContextMenu
Classpublic class FlexContextMenu
InheritanceFlexContextMenu Inheritance Menu Inheritance mx.controls.Menu
Implements mx.controls.IFlexContextMenu

ContextMenu that can be applied across an application or to specific instances of UIComponent.

For each visual element ("element") you want to apply an instance of the FlexContextMenu ("contextMenu"), call contextMenu.setContextMenu(element), or pass a reference to the contextMenu to the element's "flexContextMenu" property, OR create the contextMenu inline via MXML.

View the technical documentation on the Ardisia Labs website for more information.

Design Notes:

Default MXML PropertydataProvider



Public Methods
 MethodDefined By
  
FlexContextMenu
 Inherited
createMenu(parent:DisplayObjectContainer, dataProvider:IList, showRoot:Boolean = true, minWidth:Number = 190):Menu
[static] Added to provide consistency with the Halo Menu.
Menu
  
setContextMenu(uiComponent:InteractiveObject):void
Sets up this control as the context menu for the passed component.
FlexContextMenu
  
unsetContextMenu(uiComponent:InteractiveObject):void
Remove this menu as the context menu for the passed component.
FlexContextMenu
Protected Methods
 MethodDefined By
 Inherited
Brings the activeSubMenu to the front of the popup display list.
Menu
  
checkMenuHitTest(menu:Menu, event:MouseEvent):Boolean
Recursive function that iterates over all the menus and checks if the passed mouseEvent occurred within any of the menus.
FlexContextMenu
  
eventHandler(event:Event):void
[override] Handles events on the control.
FlexContextMenu
 Inherited
offsetMenu(menu:Menu):void
Offsets the sub menus and bounds all menus to the screen.
Menu
  
Removes any listeners added when the menu was popped up.
FlexContextMenu
Styles
 Style Description Defined By
 InheritedType: Number CSS Inheritance: no
Horizontal offset to apply to sub menus when displayed from the default.
Menu
 InheritedType: Number CSS Inheritance: no
Vertical offset to apply to sub menus when displayed from the default.
Menu
Constructor Detail
FlexContextMenu()Constructor
public function FlexContextMenu()



Method Detail
checkMenuHitTest()method
protected function checkMenuHitTest(menu:Menu, event:MouseEvent):Boolean

Recursive function that iterates over all the menus and checks if the passed mouseEvent occurred within any of the menus.

Parameters

menu:Menu — the Menu to determine if the event occurred over it
 
event:MouseEvent — the MouseEvent to get the stage mouse coordinates from

Returns
Boolean — true if the MouseEvent occurred over a menu or sub-menu
eventHandler()method 
override protected function eventHandler(event:Event):void

Handles events on the control.

Parameters

event:Event — the Event that triggered the handler

removeListeners()method 
protected function removeListeners():void

Removes any listeners added when the menu was popped up.

setContextMenu()method 
public function setContextMenu(uiComponent:InteractiveObject):void

Sets up this control as the context menu for the passed component.

Parameters

uiComponent:InteractiveObject — the InteractiveObject to setup this control for a context menu

unsetContextMenu()method 
public function unsetContextMenu(uiComponent:InteractiveObject):void

Remove this menu as the context menu for the passed component.

Parameters

uiComponent:InteractiveObject — uiComponent to setup this control for a context menu