TreeCheckBoxNode

(esrith/amos/form/TreeCheckBoxNode)

TreeCheckBoxNode is tree node with checkBox and used in TreeCheckBox.

Description
new TreeCheckBoxNode(params?srcNodeRef?)

Create a new TreeCheckBoxNode 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

alwaysShowChevron Boolean

if true, chevron will be always shown even if it has no child at all.

child Array

Array of TreeCheckBoxNode Object which represent child of this node.

disabled Boolean

if true, this checkbox (including it's child checkbox) cannot will be grayed-out.

expand Boolean

if true, node will expand to display the children.

noRelation Boolean

if true, parent state will not follow child state.

state Object

state of tree node. State can be either "check", "uncheck", or "halfcheck"

title String

title of tree node.

viewMode Boolean

if true, this checkbox (including it's child checkbox) cannot be edited by user.

Return type Description
__baseClassInherit(constructor) None

get className from superclass.

add(TreeCheckBoxNodeindex) None

add child to this node at specific position.

append(TreeCheckBoxNode) None

append child to this node.

appendDomNode(domNode) None

append domNode to this tree.

getParent() Object

get parent of this node. Return null if it has no parent.

remove(index) None

remove child from this node.

removeAll() None

remove all children from this node.

removeAllDetailsNodes() None

remove all details nodes from this node.

removeDetailsNode(domNode) None

remove details node from this node.

toggle() None

toggle state of this node between "check" and "uncheck".

Description
child-state-change (childNode, oldState, state)

The event fires when child state of this tree node is changed.

collapse

The event fires when tree node is collapse.

expand

The event fires when tree node is expand.

state-change (oldState, state)

The event fires when tree node state is changed.

Constructors Detail
new TreeCheckBoxNode(params?srcNodeRef?)

Inherited from TreeNode but overwritten in esrith/amos/form/TreeCheckBoxNode.js:22

Create a new TreeCheckBoxNode 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: {}

<Boolean>
alwaysShowChevron

if true, chevron will be always shown even if it has no child at all.

<Array>
child

Array of TreeCheckBoxNode Object which represent child of this node.

<Boolean>
disabled

if true, this checkbox (including it's child checkbox) cannot will be grayed-out.

<Boolean>
expand

if true, node will expand to display the children.

<Boolean>
noRelation

if true, parent state will not follow child state.

<Object>
state

state of tree node. State can be either "check", "uncheck", or "halfcheck"

<String>
title

title of tree node.

<Boolean>
viewMode

if true, this checkbox (including it's child checkbox) cannot be edited by user.

Methods Detail
__baseClassInherit
(
  • constructor
)

get className from superclass.

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

add child to this node at specific position.

Parameters
  • <TreeCheckBoxNode Object> TreeCheckBoxNode Required

    object you want to add as a child of this node.

  • <Index Number> index Required

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

append
(
  • TreeCheckBoxNode
)

append child to this node.

Parameters
  • <TreeCheckBoxNode Object> TreeCheckBoxNode Required

    object you want to add as a child of this node.

appendDomNode
(
  • domNode
)

append domNode to this tree.

Parameters
  • <DOMNode> domNode Required

    you want to add to this tree.

<Object>
getParent
()

get parent of this node. Return null if it has no parent.

remove
(
  • index
)

remove child from this node.

Parameters
  • <Number> index Required

    position of child you want to remove (index start at 0). index = 0 mean you want to remove first child.

removeAll
()

remove all children from this node.

removeAllDetailsNodes
()

remove all details nodes from this node.

removeDetailsNode
(
  • domNode
)

remove details node from this node.

Parameters
  • <DOMNode> domNode Required

    you want to remove to this tree.

toggle
()

toggle state of this node between "check" and "uncheck".

Events Detail
child-state-change (childNode, oldState, state)

The event fires when child state of this tree node is changed.

Event Payload:
  • <Object> childNode

    -Tree Node object of child which state is changed.

  • <Object> oldState

    -Old state before changed.

  • <Object> state

    -new state.

collapse

The event fires when tree node is collapse.

expand

The event fires when tree node is expand.

state-change (oldState, state)

The event fires when tree node state is changed.

Event Payload:
  • <Object> oldState

    -Old state before changed.

  • <Object> state

    -new state.