Alloy UI

aui-toolbar  1.0.1

 
Filters

Class Toolbar - extends Component - uses WidgetParent

A base class for Toolbar, providing:
  • Widget Lifecycle (initializer, renderUI, bindUI, syncUI, destructor)
  • The ability to manage multiple ButtonItem widgets as one group
  • Managed user interaction states (default, active, hover)
  • Keyboard accessible
Quick Example:
var instance = new A.Toolbar({
children: [
{icon: 'plus', label: 'Add'},
{icon: 'minus', label: 'Delete'}
]
}).render();
Check the list of Configuration Attributes available for Toolbar.

Constructor

Toolbar ( config )
Parameters:
config <Object> Object literal specifying widget configuration properties.

Properties inherited from WidgetParent:

Properties inherited from Attribute:

Properties inherited from Base:

Properties inherited from Component:

Configuration Attributes

activeState - boolean

Receives an interaction state of active when the user clicks on it.

defaultChildType - String | Object

The default type of child widget to render into the Element
Default Value: ButtonItem

defaultState - boolean

Receives a default interaction state.

hoverState - boolean

Receives an interaction state of hover during the mouseover event.

orientation - String

Representing the orientation of the progress bar. Could be horizontal or vertical.
Default Value: 'horizontal'

Configuration attributes inherited from WidgetParent:

Configuration attributes inherited from Widget:

Configuration attributes inherited from Base:

Configuration attributes inherited from Component:

Methods

_addByIconId

protected String _addByIconId ( icon )
Overloads the add method so that if only a string is passed in, it will be assumed to be the icon, and will automatically create a configuration object for it.
Parameters:
icon <String> the icon name or object or array of objects to add to the toolbar

_afterAddButton

protected void _afterAddButton ( event )
Syncs the UI after a button is added.
Parameters:
event <EventFacade>

_afterRemoveButton

protected void _afterRemoveButton ( event )
Syncs the UI after a button is removed.
Parameters:
event <EventFacade>

_uiSetOrientation

protected void _uiSetOrientation ( newVal )
Updates the UI for the orientation attribute.
Parameters:
newVal <String> The new value

bindUI

protected void bindUI ( )
Bind the events on the Toolbar UI. Lifecycle.

initializer

protected void initializer ( )
Construction logic executed during Toolbar instantiation. Lifecycle.

syncUI

protected void syncUI ( )
Sync the Toolbar UI. Lifecycle.

Methods inherited from Plugin.Host:

Events

activeStateChange

activeStateChange ( event )
Fires when the value for the configuration attribute 'activeState' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

defaultChildTypeChange

defaultChildTypeChange ( event )
Fires when the value for the configuration attribute 'defaultChildType' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

defaultStateChange

defaultStateChange ( event )
Fires when the value for the configuration attribute 'defaultState' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

hoverStateChange

hoverStateChange ( event )
Fires when the value for the configuration attribute 'hoverState' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

orientationChange

orientationChange ( event )
Fires when the value for the configuration attribute 'orientation' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set