Packagecom.flexicious.nestedtreedatagrid.valueobjects
Classpublic class ToolbarAction
InheritanceToolbarAction Inheritance flash.events.EventDispatcher

A class that represents a tool bar action that will appear in the toolbar of the datagrid. Please ensure to wire up the toolbarActionExecutedFunction and toolbarActionValidFunction function on the datagrid control.



Public Properties
 PropertyDefined By
  children : Array
[read-only] For hierarchical menu support
ToolbarAction
  code : String
[read-only] Code of the action, if not specified, defaults to the name
ToolbarAction
  disabledIconUrl : Object
[read-only] Icon for the image button.
ToolbarAction
  dropdownOnly : Boolean
[read-only] This means the action itself is only a container for subactions, clicking on it does nothing.
ToolbarAction
  enabled : Boolean
[read-only] To support runtime enable/disable of toolbar actions.
ToolbarAction
  executedFunction : Function = null
A callback that lets you control what this toolbar action bridge.
ToolbarAction
  iconUrl : Object
[read-only] Icon for the image button.
ToolbarAction
  isDropdownAction : Boolean
[read-only] Returns true if type!=seperator and has subActions
ToolbarAction
  isEnabledFunction : Function = null
A callback that lets you control if this toolbar action is currently valid.
ToolbarAction
  isRegularAction : Boolean
[read-only] Returns true if type!=seperator and does not have subActions
ToolbarAction
  isSeparator : Boolean
[read-only] Returns true if type==seperator
ToolbarAction
  level : int
[read-only] Level at which the action is to be applied.
ToolbarAction
  name : String
Name of the action
ToolbarAction
  requiresSelection : Boolean
[read-only] This action will be disabled if a selection is required and there is nothing selected in the grid.
ToolbarAction
  requiresSingleSelection : Boolean
[read-only] This action will be disabled if a more than one item or no items are selected in the grid.
ToolbarAction
  seperatorAfter : Boolean
[read-only] Flag to control whether or not to draw a seperator after the action icon Deperecated.
ToolbarAction
  seperatorBefore : Boolean
[read-only] Flag to control whether or not to draw a seperator before the action icon.
ToolbarAction
  subActions : Array
A list of ToolbarAction objects that get converted into dropdown menu buttons.
ToolbarAction
  tooltip : String
[read-only] Tooltip for the icon.
ToolbarAction
  trigger : Object
The actual button associated with the toolbar action.
ToolbarAction
Public Methods
 MethodDefined By
  
ToolbarAction(name:String, level:int = -1, code:String, tooltip:String, iconUrl:Object, seperatorBefore:Boolean = false, seperatorAfter:Boolean = false, subActions:Array = null, requiresSelection:Boolean = false, requiresSingleSelection:Boolean = false, disableIconUrl:Object, isEnabledFunction:Function = null, executedFunction:Function = null)
A class that represents a custom toolbar action.
ToolbarAction
Public Constants
 ConstantDefined By
  DEFAULT_ICON : String = ../assets/images/customAction.png
[static] Default icon.
ToolbarAction
Property Detail
childrenproperty
children:Array  [read-only]

For hierarchical menu support


Implementation
    public function get children():Array
codeproperty 
code:String  [read-only]

Code of the action, if not specified, defaults to the name

This property can be used as the source for data binding.


Implementation
    public function get code():String
disabledIconUrlproperty 
disabledIconUrl:Object  [read-only]

Icon for the image button. If not specified, defaults to the custom action icon.

This property can be used as the source for data binding.


Implementation
    public function get disabledIconUrl():Object
dropdownOnlyproperty 
dropdownOnly:Boolean  [read-only]

This means the action itself is only a container for subactions, clicking on it does nothing.

This property can be used as the source for data binding.


Implementation
    public function get dropdownOnly():Boolean
enabledproperty 
enabled:Boolean  [read-only]

To support runtime enable/disable of toolbar actions.

This property can be used as the source for data binding.


Implementation
    public function get enabled():Boolean
executedFunctionproperty 
public var executedFunction:Function = null

A callback that lets you control what this toolbar action bridge.

iconUrlproperty 
iconUrl:Object  [read-only]

Icon for the image button. If not specified, defaults to the custom action icon.

This property can be used as the source for data binding.


Implementation
    public function get iconUrl():Object
isDropdownActionproperty 
isDropdownAction:Boolean  [read-only]

Returns true if type!=seperator and has subActions

This property can be used as the source for data binding.


Implementation
    public function get isDropdownAction():Boolean
isEnabledFunctionproperty 
public var isEnabledFunction:Function = null

A callback that lets you control if this toolbar action is currently valid.

isRegularActionproperty 
isRegularAction:Boolean  [read-only]

Returns true if type!=seperator and does not have subActions

This property can be used as the source for data binding.


Implementation
    public function get isRegularAction():Boolean
isSeparatorproperty 
isSeparator:Boolean  [read-only]

Returns true if type==seperator

This property can be used as the source for data binding.


Implementation
    public function get isSeparator():Boolean
levelproperty 
level:int  [read-only]

Level at which the action is to be applied. If not specified, defaults to 1. If you set this to -1, the action will appear in the tool bar at all levels. Defaults to -1

This property can be used as the source for data binding.


Implementation
    public function get level():int
nameproperty 
name:String

Name of the action

This property can be used as the source for data binding.


Implementation
    public function get name():String
    public function set name(value:String):void
requiresSelectionproperty 
requiresSelection:Boolean  [read-only]

This action will be disabled if a selection is required and there is nothing selected in the grid.

This property can be used as the source for data binding.


Implementation
    public function get requiresSelection():Boolean
requiresSingleSelectionproperty 
requiresSingleSelection:Boolean  [read-only]

This action will be disabled if a more than one item or no items are selected in the grid.

This property can be used as the source for data binding.


Implementation
    public function get requiresSingleSelection():Boolean
seperatorAfterproperty 
seperatorAfter:Boolean  [read-only]

Flag to control whether or not to draw a seperator after the action icon Deperecated. Please use the code='separator' instead

This property can be used as the source for data binding.


Implementation
    public function get seperatorAfter():Boolean
seperatorBeforeproperty 
seperatorBefore:Boolean  [read-only]

Flag to control whether or not to draw a seperator before the action icon. Deperecated. Please use the code='separator' instead

This property can be used as the source for data binding.


Implementation
    public function get seperatorBefore():Boolean
subActionsproperty 
public var subActions:Array

A list of ToolbarAction objects that get converted into dropdown menu buttons.

tooltipproperty 
tooltip:String  [read-only]

Tooltip for the icon. If not specified, defaults to the name

This property can be used as the source for data binding.


Implementation
    public function get tooltip():String
triggerproperty 
public var trigger:Object

The actual button associated with the toolbar action.

Constructor Detail
ToolbarAction()Constructor
public function ToolbarAction(name:String, level:int = -1, code:String, tooltip:String, iconUrl:Object, seperatorBefore:Boolean = false, seperatorAfter:Boolean = false, subActions:Array = null, requiresSelection:Boolean = false, requiresSingleSelection:Boolean = false, disableIconUrl:Object, isEnabledFunction:Function = null, executedFunction:Function = null)

A class that represents a custom toolbar action.

Parameters
name:String — Name of the toolbar action
 
level:int (default = -1) — Nest Depth of the level to enable the toolbar action for. Nest Depths Start at 1. Use -1 for all levels.
 
code:String — The Code associated with the tool bar action, not required.
 
tooltip:String — The hover over tooltip when the user hovers over the image specified by the icon url
 
iconUrl:Object — The image to use for the toolbar action.
 
seperatorBefore:Boolean (default = false) — Whether or not to draw a separator before the toolbar action
 
seperatorAfter:Boolean (default = false) — Whether or not to draw a separator after the toolbar action
 
subActions:Array (default = null)
 
requiresSelection:Boolean (default = false)
 
requiresSingleSelection:Boolean (default = false)
 
disableIconUrl:Object
 
isEnabledFunction:Function (default = null)
 
executedFunction:Function (default = null)
Constant Detail
DEFAULT_ICONConstant
public static const DEFAULT_ICON:String = ../assets/images/customAction.png

Default icon.