Packagecom.ericfeminella.ui
Classpublic final class ConfigurableContextMenuBuilder

Constructs a new instance of ConfigurableContextMenu from a collection of ContextMenuItemClient instances

The ConfigurableContextMenuBuilder accepts a ListCollectionView from which a new ConfigurableContextMenu object is created. The ListCollectionView should only contain objects of type ContextMenuItem or optionally objects of type ContextMenuItemClient

See also

flash.ui.ContextMenuItem


Public Methods
 MethodDefined by
  
build(owner:InteractiveObject, menuItemsCollection:ListCollectionView, menuSelectListener:Function = null):ConfigurableContextMenu
[static] Builds a ConfigurableContextMenu from an ArrayCollection of objects

The following example demonstrated how ConfigurableContextMenuBuilder can be utilized to construct a ConfigurableContextMenu

ConfigurableContextMenuBuilder
Method detail
build()method
public static function build(owner:InteractiveObject, menuItemsCollection:ListCollectionView, menuSelectListener:Function = null):ConfigurableContextMenu

Builds a ConfigurableContextMenu from an ArrayCollection of objects

The following example demonstrated how ConfigurableContextMenuBuilder can be utilized to construct a ConfigurableContextMenu

Parameters
owner:InteractiveObject — the owner (InteractiveObject) in which to apply the context menu
 
menuItemsCollection:ListCollectionView — ContextMenuItem[Client] collection from which to build the ConfigurableContextMenu
 
menuSelectListener:Function (default = null) — a Listener which is invoked upon a ContextMenuItem select event

Returns
ConfigurableContextMenu — a newly constructed ConfigurableContextMenu object instance

Example
    
   var saveMenuItem:ContextMenuItemClient   = new ContextMenuItemClient( new ContextMenuItem("Save Products"), onSave );
   var deleteMenuItem:ContextMenuItemClient = new ContextMenuItemClient( new ContextMenuItem("Delete Products"), onDelete );
   
   var items:ListCollectionView = new ArrayCollection( [saveMenuItem, deleteMenuItem]);
   var cm:IConfigurableContextMenu = ConfigurableContextMenuBuilder.build( this, items );