Packagecom.ghostwire.ui.data
Classpublic class uiMenuModel
InheritanceuiMenuModel Inheritance uiModel Inheritance flash.events.EventDispatcher

Represents a collection of items used as data source for uiMenu. Duplicate items are not allowed in a single model but different models can contain the same item(s).

~ This class is available in Aspire UI Components Standard Edition ~



Public Properties
 PropertyDefined by
 Inheritedlength : uint
A non-negative integer specifying the number of items in the model.
uiModel
Public Methods
 MethodDefined by
  
uiMenuModel(items:Object = null)
Constructor - creates a new uiMenuModel object.
uiMenuModel
 Inherited
addItem(item:Object):void
Appends an item to the model.
uiModel
 Inherited
addItems(... items):void
Appends the specified item(s) to the model and dispatches a uiModelEvent.ADD event.
uiModel
 Inherited
addItemsAt(index:int, ... items):void
Adds the specified item(s) to the model at the specified index position and dispatches a uiModelEvent.ADD event.
uiModel
 Inherited
Returns a copy of this uiModel object.
uiModel
 Inherited
cloneItem(item:Object):Object
[static] Returns a copy of an item.
uiModel
  
getGroupItem(group:String):Object
Gets the currently selected radio button menu item object in the indicated group.
uiMenuModel
 Inherited
getItemAt(index:int):Object
Returns the item at the specified index position.
uiModel
 Inherited
getItemById(id:String):Object
Returns the item with the specified id property value.
uiModel
 Inherited
getItems(startIndex:int, endIndex:int):Array
Returns an array of items in the model starting from startIndex and to endIndex.
uiModel
 Inherited
indexOf(item:Object):int
Returns the index position of the item in the model.
uiModel
 Inherited
invalidate():void
Invalidates all the items in this model dispatching a uiModelEvent.CHANGE event.
uiModel
 Inherited
invalidateItemAt(index:int):void
Invalidates the item at the specified index position dispatching a uiModelEvent.CHANGE event.
uiModel
 Inherited
invalidateItems(... items):void
Invalidates the specified item(s) dispatching a uiModelEvent.CHANGE event.
uiModel
 Inherited
loadXML(path:String):URLLoader
Loads an external XML file.
uiModel
 Inherited
removeAll():void
Removes all item(s) from the model and dispatches a uiModelEvent.REMOVE event.
uiModel
 Inherited
removeItem(item:Object):void
Removes a single item from the model.
uiModel
 Inherited
removeItemAt(index:int):Object
Removes the item at the specified index position from the model and dispatches a uiModelEvent.REMOVE event.
uiModel
 Inherited
removeItems(... items):void
Removes the specified item(s) from the model and dispatches a uiModelEvent.REMOVE event.
uiModel
 Inherited
replaceItem(oldItem:Object, newItem:Object):Object
Replaces an existing item in the model with a new item and dispatches a uiModelEvent.REPLACE event.
uiModel
  
setGroupItem(item:Object):void
Sets the indicated radio button menu item object as the selected member in its group of items.
uiMenuModel
 Inherited
sort(... args):Array
Sorts the items in the model and dispatches a uiModelEvent.SORT event.
uiModel
 Inherited
sortOn(fieldName:Object, options:Object = null):Array
Sorts the items in the model according to one or more fields and dispatches a uiModelEvent.SORT event.
uiModel
 Inherited
swapItems(item1:Object, item2:Object):void
Swaps the index positions of the two specified items.
uiModel
 Inherited
toArray():Array
Returns an Array object containing the items in the model.
uiModel
Events
 EventSummaryDefined by
 Inherited
add
Dispatched when one or more items have been added to the model.uiModel
 Inherited Dispatched when one or more items in the model have been invalidated (modified).uiModel
 Inherited Dispatched when one or more items have been removed from the model.uiModel
 Inherited Dispatched when an item in the model has been replaced with another item.uiModel
 Inherited Dispatched when sorting has been performed on the items in the model.uiModel
Constructor detail
uiMenuModel()constructor
public function uiMenuModel(items:Object = null)

Constructor - creates a new uiMenuModel object.

Parameters
items:Object (default = null) — The list of item(s) to populate the model. You can specify an array of data objects (duplicates will be ignored), an array of strings, or an XML object.
Method detail
getGroupItem()method
public function getGroupItem(group:String):Object

Gets the currently selected radio button menu item object in the indicated group.

Parameters
group:String — A String value indicating the group to query.

Returns
Object
setGroupItem()method 
public function setGroupItem(item:Object):void

Sets the indicated radio button menu item object as the selected member in its group of items. The specified item must belong to a group (its "group" property must be defined), otherwise calling this method has no effect.

Parameters
item:Object — The item Object to set as the selected member of its group of items.