| Package | weavejs.util |
| Class | public class WeaveMenuItem |
| Inheritance | WeaveMenuItem WeaveTreeItem Object |
| Property | Defined By | ||
|---|---|---|---|
![]() | cacheSettings : Object
Maps a property name to a Boolean which enables or disables caching for that property. | WeaveTreeItem | |
| children : * [override]
Gets a filtered copy of the child menu items. | WeaveMenuItem | ||
| click : * = null
This can be either a Function or an ILinkableVariable to be treated as a boolean setting. | WeaveMenuItem | ||
![]() | data : Object = null
This can be any data associated with this tree item. | WeaveTreeItem | |
![]() | dependency : ILinkableObject
A pointer to the ILinkableObject that created this node. | WeaveTreeItem | |
| enabled : *
This can be set to either a Boolean, a Function, or an ILinkableVariable. | WeaveMenuItem | ||
| groupName : String = null
This property is checked by Flex's default data descriptor. | WeaveMenuItem | ||
| label : * [override] | WeaveMenuItem | ||
| shown : *
Specifies whether or not this item should be shown. | WeaveMenuItem | ||
| toggled : *
This property is checked by Flex's default data descriptor. | WeaveMenuItem | ||
| type : String = null
This property is checked by Flex's default data descriptor. | WeaveMenuItem | ||
| Method | Defined By | ||
|---|---|---|---|
WeaveMenuItem(params:Object)
Constructs a new WeaveMenuItem. | WeaveMenuItem | ||
![]() | createItems(WeaveTreeItem_implementation:Class, items:Array):Array [static]
Initializes an Array of WeaveTreeItems using an Array of objects to pass to the constructor. | WeaveTreeItem | |
createMenuItems(items:Array):Array [static]
Initializes an Array of WeaveMenuItems using an Array of objects to pass to the constructor. | WeaveMenuItem | ||
runClickFunction():void
If the click property is set to a Function, it will be called like click.call(this)
or click.call(this, this) if the former produces an ArgumentError. | WeaveMenuItem | ||
| Constant | Defined By | ||
|---|---|---|---|
| TYPE_CHECK : String = check [static] | WeaveMenuItem | ||
| TYPE_RADIO : String = radio [static] | WeaveMenuItem | ||
| TYPE_SEPARATOR : String = separator [static] | WeaveMenuItem | ||
| children | property |
children:*[override] Gets a filtered copy of the child menu items. When this property is accessed, refresh() will be called except if refresh() is already being called. This property is checked by Flex's default data descriptor.
public function get children():* public function set children(value:any):void| click | property |
public var click:* = nullThis can be either a Function or an ILinkableVariable to be treated as a boolean setting. The Function signature can be like function():void or function(item:WeaveMenuItem):void. Instead of reading this property directly, call runClickFunction().
See also
| enabled | property |
enabled:*This can be set to either a Boolean, a Function, or an ILinkableVariable. This property is checked by Flex's default data descriptor.
public function get enabled():* public function set enabled(value:any):void| groupName | property |
public var groupName:String = nullThis property is checked by Flex's default data descriptor.
| label | property |
label:*[override] public function get label():* public function set label(value:any):void| shown | property |
shown:*Specifies whether or not this item should be shown. This can be set to either a Boolean, a Function, an ILinkableVariable, or an Array of ILinkableVariables.
public function get shown():* public function set shown(value:any):void| toggled | property |
toggled:*This property is checked by Flex's default data descriptor.
public function get toggled():* public function set toggled(value:any):void| type | property |
public var type:String = nullThis property is checked by Flex's default data descriptor.
| WeaveMenuItem | () | Constructor |
public function WeaveMenuItem(params:Object)Constructs a new WeaveMenuItem.
Parametersparams:Object — An Object containing property values to set on the WeaveMenuItem.
If this is a String equal to "separator" (TYPE_SEPARATOR), a new separator will be created.
|
| createMenuItems | () | method |
public static function createMenuItems(items:Array):ArrayInitializes an Array of WeaveMenuItems using an Array of objects to pass to the constructor. Any Arrays passed in will be flattened and surrounded by separators.
Parameters
items:Array — An Array of item descriptors.
|
Array |
| runClickFunction | () | method |
public function runClickFunction():voidIf the click property is set to a Function, it will be called like click.call(this) or click.call(this, this) if the former produces an ArgumentError. If the click property is set to an ILinkableVariable, it will be toggled as a boolean.
| TYPE_CHECK | Constant |
public static const TYPE_CHECK:String = check| TYPE_RADIO | Constant |
public static const TYPE_RADIO:String = radio| TYPE_SEPARATOR | Constant |
public static const TYPE_SEPARATOR:String = separator