Package | ardisia.components.flexContextMenu |
Class | public class FlexContextMenu |
Inheritance | FlexContextMenu Menu mx.controls.Menu |
Implements | mx.controls.IFlexContextMenu |
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
Method | Defined By | ||
---|---|---|---|
FlexContextMenu | |||
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 |
Method | Defined By | ||
---|---|---|---|
bringToFront():void
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 | ||
offsetMenu(menu:Menu):void
Offsets the sub menus and bounds all menus to the screen. | Menu | ||
removeListeners():void
Removes any listeners added when the menu was popped up. | FlexContextMenu |
FlexContextMenu | () | Constructor |
public function FlexContextMenu()
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
|
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
|