| Package | com.ericfeminella.ui |
| Class | public final class ConfigurableContextMenuBuilder |
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
| Method | Defined 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 | ConfigurableContextMenuBuilder | ||
| build | () | method |
public static function build(owner:InteractiveObject, menuItemsCollection:ListCollectionView, menuSelectListener:Function = null):ConfigurableContextMenuBuilds a ConfigurableContextMenu from an ArrayCollection of objects
The following example demonstrated how ConfigurableContextMenuBuilder
can be utilized to construct a ConfigurableContextMenu
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
|
ConfigurableContextMenu —
a newly constructed ConfigurableContextMenu object instance
|
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 );