TreeCheckBox

(esrith/amos/form/TreeCheckBox)

TreeCheckBox is control used to represent tree structure with check box. TreeCheckBox contains collection of TreeCheckBoxNode object to represent each node.

Description
new TreeCheckBox(params?srcNodeRef?)

Create a new TreeCheckBox widget.

Type Description
_styleAttr Object

when you want to set style for other node. you can do this by example... _styleAttr:{ style-property:effected-node } this property was effected where this class was inherited and your widget was called by... var widget = new YourWidget({ style:{ style-property:style-value } }); now effected-node in you widget will have style-property = style-value

nodes Array

Array of TreeCheckBoxNode Object which represent node in this tree.

value Array

Array of value of all checked nodes. This property is read-only.

viewMode Boolean

if true, all checkbox cannot be edited by user.

Return type Description
__baseClassInherit(constructor) None

get className from superclass.

add(TreeCheckBoxNodeindex) None

add new node to tree at specific position.

append(TreeCheckBoxNode) None

append node to this tree.

checkAll() None

check all nodes in this tree.

expandAll() None

expand all nodes and children in the tree.

getCheckedNodes(recursive) Array

get array of checked nodes in this tree.

getHalfCheckedNodes() Array

get array of halfchecked nodes in this tree.

getNodes(recursive) Array

get array of nodes in this tree.

getUncheckedNodes(recursive) Array

get array of unchecked nodes in this tree.

remove(index) None

remove node from this tree.

removeAll() None

remove all nodes from this tree.

uncheckAll() None

uncheck all nodes in this tree.

Description
check (node, oldState)

The event fires when node in tree is checked.

collapse (node)

The event fires when node in tree is collapse.

expand (node)

The event fires when node in tree is expand.

halfcheck (node, oldState)

The event fires when node in tree is halfchecked.

uncheck (node, oldState)

The event fires when node in tree is unchecked.

Constructors Detail
new TreeCheckBox(params?srcNodeRef?)

Inherited from Tree but overwritten in esrith/amos/form/TreeCheckBox.js:22

Create a new TreeCheckBox widget.

Parameters:
Properties Detail
<Object>
_styleAttr

when you want to set style for other node. you can do this by example... _styleAttr:{ style-property:effected-node } this property was effected where this class was inherited and your widget was called by... var widget = new YourWidget({ style:{ style-property:style-value } }); now effected-node in you widget will have style-property = style-value

Default value: {}

<Array>
nodes

Inherited from _TreeBase but overwritten in esrith/amos/form/TreeCheckBox.js:74

Array of TreeCheckBoxNode Object which represent node in this tree.

<Array>
value

Inherited from _TreeBase but overwritten in esrith/amos/form/TreeCheckBox.js:105

Array of value of all checked nodes. This property is read-only.

<Boolean>
viewMode

if true, all checkbox cannot be edited by user.

Methods Detail
__baseClassInherit
(
  • constructor
)

get className from superclass.

Parameters
  • <Object> constructor Required
add
(
  • TreeCheckBoxNode
  • index
)

Inherited from _TreeBase but overwritten in esrith/amos/form/TreeCheckBox.js:80

add new node to tree at specific position.

Parameters
  • <TreeCheckBoxNode Object> TreeCheckBoxNode Required

    object you want to add to this tree.

  • <Number> index Required

    position you want to locate this node (index start at 0). index = 0 means it will be the first node of this tree.

append
(
  • TreeCheckBoxNode
)

Inherited from _TreeBase but overwritten in esrith/amos/form/TreeCheckBox.js:87

append node to this tree.

Parameters
  • <TreeCheckBoxNode Object> TreeCheckBoxNode Required

    object you want to add to this tree.

checkAll
()

check all nodes in this tree.

expandAll
()

Inherited from _TreeBase but overwritten in esrith/amos/core/_TreeBase.js:132

expand all nodes and children in the tree.

<Array>
getCheckedNodes
(
  • recursive
)

get array of checked nodes in this tree.

Parameters
  • <Boolean> recursive Required

    if false, return array will not contain child if parent is checked.

<Array>
getHalfCheckedNodes
()

get array of halfchecked nodes in this tree.

<Array>
getNodes
(
  • recursive
)

get array of nodes in this tree.

Parameters
  • <Boolean> recursive Required

    if false, return array will not contain child if parent is checked.

<Array>
getUncheckedNodes
(
  • recursive
)

get array of unchecked nodes in this tree.

Parameters
  • <Boolean> recursive Required

    if false, return array will not contain child if parent is unchecked.

remove
(
  • index
)

remove node from this tree.

Parameters
  • <Index Number> index Required

    position of node you want to remove (index start at 0). index = 0 mean you want to remove first node in this tree.

removeAll
()

remove all nodes from this tree.

uncheckAll
()

uncheck all nodes in this tree.

Events Detail
check (node, oldState)

The event fires when node in tree is checked.

Event Payload:
  • <TreeCheckBoxNode Object> node

    -tree node which is checked.

  • <String> oldState

    -old state of tree node before checked.

collapse (node)

Inherited from _TreeBase but overwritten in esrith/amos/form/TreeCheckBox.js:98

The event fires when node in tree is collapse.

Event Payload:
  • <TreeCheckBoxNode Object> node

    -tree node which is collapsed.

expand (node)

Inherited from _TreeBase but overwritten in esrith/amos/form/TreeCheckBox.js:93

The event fires when node in tree is expand.

Event Payload:
  • <TreeCheckBoxNode Object> node

    -tree node which is expanded.

halfcheck (node, oldState)

The event fires when node in tree is halfchecked.

Event Payload:
  • <TreeCheckBoxNode Object> node

    -tree node which is halfchecked.

  • <String> oldState

    -old state of tree node before halfchecked.

uncheck (node, oldState)

The event fires when node in tree is unchecked.

Event Payload:
  • <TreeCheckBoxNode Object> node

    -tree node which is unchecked.

  • <String> oldState

    -old state of tree node before unchecked.