Tree.Selectable Class
Extension for Tree
that adds the concept of selection state for nodes.
Constructor
Tree.Selectable
()
Item Index
Properties
Attributes
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.SelectableNode to select.
-
[options]
Object optionalOptions.
-
[silent=false]
Boolean optionalIf
true
, theselect
event will be suppressed. -
[src]
String optionalSource 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 optionalOptions.
-
[silent=false]
Boolean optionalIf
true
, theunselect
event will be suppressed. -
[src]
String optionalSource 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.SelectableNode to unselect.
-
[options]
Object optionalOptions.
-
[silent=false]
Boolean optionalIf
true
, theunselect
event will be suppressed. -
[src]
String optionalSource 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
EventFacadeAn Event Facade object with the following attribute-specific properties added: