Tree.Selectable Class
+ + + + +Extension for Tree that adds the concept of selection state for nodes.
Constructor
+Tree.Selectable
+
+
+ ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
- Index + + +
- Methods + + +
- Properties + + +
- Attributes + + +
- Events + +
Item Index
+ + +Methods
+ +-
+
+
- + getSelectedNodes + + + + + +
- + selectNode + + + + + +
- + unselect + + + + + +
- + unselectNode + + + + + +
Properties
+ +-
+
+
- + _selectedMap + + + + + +
Attributes
+ +-
+
+
- + multiSelect + + +
Methods
+ + +getSelectedNodes
+
+
+ ()
+
+
+
+
+ Tree.Node.Selectable[]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns an array of nodes that are currently selected.
+Returns:
+ +selectNode
+
+
+ -
+
+
-
+
+
node+ +
+
+ -
+
+
[options]+ +
+
+
Selects the specified node.
+Parameters:
+ +-
+
+
-
+
+
node+ Tree.Node.Selectable + + + + +++ + +Node to select.
+
+
+ -
+
+
[options]+ Object + optional + + + + +++ + +Options.
+-
+
+
-
+
+
[silent=false]+ Boolean + optional + + +++ + +If
+true, theselectevent + will be suppressed.
+
+ -
+
+
[src]+ String + optional + + +++ + +Source of the change, to be passed along + to the event facade of the resulting event. This can be used to + distinguish between changes triggered by a user and changes + triggered programmatically, for example.
+
+
+
+
+ -
+
+
unselect
+
+
+ -
+
+
-
+
+
[options]+ +
+
+
Unselects all selected nodes.
+Parameters:
+ +-
+
+
-
+
+
[options]+ Object + optional + + + + +++ + +Options.
+-
+
+
-
+
+
[silent=false]+ Boolean + optional + + +++ + +If
+true, theunselectevent + will be suppressed.
+
+ -
+
+
[src]+ String + optional + + +++ + +Source of the change, to be passed along + to the event facade of the resulting event. This can be used to + distinguish between changes triggered by a user and changes + triggered programmatically, for example.
+
+
+
+
+ -
+
+
unselectNode
+
+
+ -
+
+
-
+
+
node+ +
+
+ -
+
+
[options]+ +
+
+
Unselects the specified node.
+Parameters:
+ +-
+
+
-
+
+
node+ Tree.Node.Selectable + + + + +++ + +Node to unselect.
+
+
+ -
+
+
[options]+ Object + optional + + + + +++ + +Options.
+-
+
+
-
+
+
[silent=false]+ Boolean + optional + + +++ + +If
+true, theunselectevent + will be suppressed.
+
+ -
+
+
[src]+ String + optional + + +++ + +Source of the change, to be passed along + to the event facade of the resulting event. This can be used to + distinguish between changes triggered by a user and changes + triggered programmatically, for example.
+
+
+
+
+ -
+
+
Properties
+ + +_selectedMap
+ Object
+
+
+
+
+ protected
+
+
+
+
+
+
+
+
+ Mapping of node ids to node instances for nodes in this tree that are +currently selected.
+Attributes
+ + +multiSelect
+ Boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Whether or not to allow multiple nodes to be selected at once.
+Default: false
+ + + +Fires event multiSelectChange
+
+
+ Fires when the value for the configuration attribute multiSelect 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:
+ +-
+
-
+
e+ EventFacade + ++ An Event Facade object with the following + attribute-specific properties added: ++ +-
+
-
+
prevVal+ Any +The value of the attribute, prior to it being set.+
+ -
+
newVal+ Any +The value the attribute is to be set to.+
+ -
+
attrName+ String +The name of the attribute being set.+
+ -
+
subAttrName+ String +If setting a property within the attribute's value, the name of the sub-attribute property being set.+
+
+ -
+
Events
+ + +select
+
+
+
+
+
+
+
+
+
+
+
+
+ Fired when a node is selected.
+Event Payload:
+ +-
+
+
-
+
+
node+ Tree.Node + + + + +++ + +Node being selected.
+
+
+
unselect
+
+
+
+
+
+
+
+
+
+
+
+
+ Fired when a node is unselected.
+Event Payload:
+ +-
+
+
-
+
+
node+ Tree.Node + + + + +++ + +Node being unselected.
+
+
+
