Alloy UI

aui-tree  1.0.1

 
Filters

Class TreeViewDD - extends TreeView

A base class for TreeViewDD, providing:
  • Widget Lifecycle (initializer, renderUI, bindUI, syncUI, destructor)
  • DragDrop support for the TreeNodes
Quick Example:
Check the list of Configuration Attributes available for TreeViewDD.

Constructor

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

Properties

direction - protected String

Direction of the drag (i.e. could be 'up' or 'down').

TreeNode.ATTRS - static Object

Static property used to define the default attribute configuration for the TreeNode.

TreeNode.NAME - static String

Static property provides a string to identify the class.

TreeViewDD.ATTRS - static Object

Static property used to define the default attribute configuration for the TreeViewDD.

TreeViewDD.NAME - static String

Static property provides a string to identify the class.

Properties inherited from TreeData:

Properties inherited from Base:

Properties inherited from TreeView:

Properties inherited from Attribute:

Configuration Attributes

checkContainerEl - Node | String

Container element for the checkbox.
Default Value: Generated DOM element.

checked - boolean

Whether the TreeNode is checked or not.
Default Value: false

checkEl - Node | String

Checkbox element.
Default Value: Generated DOM element.

checkName - String

Name of the checkbox element used on the current TreeNode.
Default Value: 'tree-node-check'

dropAction - String

Drop action (i.e. could be 'append', 'below' or 'above').
Default Value: null

helper - Node | String

Dragdrop helper element.
Default Value: null

lastY - Number

Last Y.
Default Value: 0

nodeContent - Node

Reference for the current drop node.
Default Value: null

scrollDelay - Number

Delay of the scroll while dragging the TreeNodes.
Default Value: 100

Configuration attributes inherited from TreeData:

Configuration attributes inherited from Base:

Configuration attributes inherited from TreeView:

Methods

_appendState

protected void _appendState ( nodeContent )
Set the append CSS state on the passed nodeContent.
Parameters:
nodeContent <Node>

_bindDragDrop

protected void _bindDragDrop ( )
Bind DragDrop events.

_createDrag

protected void _createDrag ( node )
Setup DragDrop on the TreeNodes.
Parameters:
node <Node>

_goingDownState

protected void _goingDownState ( nodeContent )
Set the going down CSS state on the passed nodeContent.
Parameters:
nodeContent <Node>

_goingUpState

protected void _goingUpState ( nodeContent )
Set the going up CSS state on the passed nodeContent.
Parameters:
nodeContent <Node>

_handleEvent

protected void _handleEvent ( event )
Fires after the append event.
Parameters:
event <EventFacade> append event facade

_onDragAlign

protected void _onDragAlign ( event )
Fires on drag align event.
Parameters:
event <EventFacade> append event facade

_onDragStart

protected void _onDragStart ( event )
Fires on drag start event.
Parameters:
event <EventFacade> append event facade

_onDropExit

protected void _onDropExit ( event )
Fires on drop exit event.
Parameters:
event <EventFacade> append event facade

_onDropHit

protected void _onDropHit ( event )
Fires on drop hit event.
Parameters:
event <EventFacade> append event facade

_onDropOver

protected void _onDropOver ( event )
Fires on drop over event.
Parameters:
event <EventFacade> append event facade

_resetState

protected void _resetState ( nodeContent )
Set the reset CSS state on the passed nodeContent.
Parameters:
nodeContent <Node>

_updateNodeState

protected void _updateNodeState ( event )
Update the CSS node state (i.e. going down, going up, append etc).
Parameters:
event <EventFacade>

bindUI

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

check

void check ( )
Check the current TreeNode.

renderUI

protected void renderUI ( )
Create the DOM structure for the TreeViewDD. Lifecycle.

toggleCheck

void toggleCheck ( )
Toggle the check status of the current TreeNode.

uncheck

void uncheck ( )
Uncheck the current TreeNode.

Methods inherited from Plugin.Host:

Events

checkContainerElChange

checkContainerElChange ( event )
Fires when the value for the configuration attribute 'checkContainerEl' 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

checkedChange

checkedChange ( event )
Fires when the value for the configuration attribute 'checked' 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

checkElChange

checkElChange ( event )
Fires when the value for the configuration attribute 'checkEl' 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

checkNameChange

checkNameChange ( event )
Fires when the value for the configuration attribute 'checkName' 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

dropActionChange

dropActionChange ( event )
Fires when the value for the configuration attribute 'dropAction' 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

helperChange

helperChange ( event )
Fires when the value for the configuration attribute 'helper' 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

lastYChange

lastYChange ( event )
Fires when the value for the configuration attribute 'lastY' 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

nodeContentChange

nodeContentChange ( event )
Fires when the value for the configuration attribute 'nodeContent' 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

scrollDelayChange

scrollDelayChange ( event )
Fires when the value for the configuration attribute 'scrollDelay' 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