Packagecom.ericfeminella.system.contextmenu
Interfacepublic interface IConfigurableContextMenu
SubinterfacesIDynamicContextMenu

Defines the contract for classes which must provide an API which allows users to configure a custom ContextMenu



Public Methods
 MethodDefined by
  
addContextMenuCaptionItem(caption:String, seperator:Boolean = false):void
Adds a ContextMenuItem to a ConfigurableContextMenu which contains a caption only
IConfigurableContextMenu
  
addContextMenuCommandItem(caption:String, command:Function, seperator:Boolean = false, enabled:Boolean = true):void
Adds a ContextMenuItem to a ConfigurableContextMenu which contains an associated command which handles the item on selection
IConfigurableContextMenu
  
removeContextMenuItem(caption:String):void
Removes a ContextMenuItem from a ConfigurableContextMenu
IConfigurableContextMenu
  
Removes all built-in ContextMenu items from a ConfigurableContextMenu
IConfigurableContextMenu
Method detail
addContextMenuCaptionItem()method
public function addContextMenuCaptionItem(caption:String, seperator:Boolean = false):void

Adds a ContextMenuItem to a ConfigurableContextMenu which contains a caption only

Parameters
caption:String — caption of the item
 
seperator:Boolean (default = false) — is an item seperator is to be added, the default is false
addContextMenuCommandItem()method 
public function addContextMenuCommandItem(caption:String, command:Function, seperator:Boolean = false, enabled:Boolean = true):void

Adds a ContextMenuItem to a ConfigurableContextMenu which contains an associated command which handles the item on selection

Parameters
caption:String — caption of the item
 
command:Function — command associated with the item selection event
 
seperator:Boolean (default = false) — is an item seperator is to be added, the default is false
 
enabled:Boolean (default = true) — if the item is enabled or disabled, the default is true (enabled)
removeContextMenuItem()method 
public function removeContextMenuItem(caption:String):void

Removes a ContextMenuItem from a ConfigurableContextMenu

Parameters
caption:String — caption of the ContextMenuItem to remove
removeDefaultItems()method 
public function removeDefaultItems():void

Removes all built-in ContextMenu items from a ConfigurableContextMenu