Class GSSelectionMixin
A mixin class providing item selection management capabilities.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
|
addToSelection(item)
Expands the current selection to include the item passed in
|
|
|
Removes all items from the current selection
|
|
|
Gets the current selection
|
|
|
isSelected(item)
Tests if the item passed in is currently selected
|
|
|
removeFromSelection(item)
Removes the passed in item from the current selection
|
|
|
setSelection(items)
Sets the selection
|
| Event Attributes | Event Name and Description |
|---|---|
|
selectionChanged(selection)
|
Method Detail
addToSelection(item)
Expands the current selection to include the item passed in
- Parameters:
- {Object} item
- the item to add to the selection
clearSelection()
Removes all items from the current selection
{Array}
getSelection()
Gets the current selection
- Returns:
- {Array} the selected items
isSelected(item)
Tests if the item passed in is currently selected
- Parameters:
- {Object} item
- the item to test
{boolean}
removeFromSelection(item)
Removes the passed in item from the current selection
- Parameters:
- {Object} item
- the item to remove
- Returns:
- {boolean}
trueif the item was successfully removed from the selection
setSelection(items)
Sets the selection
- Parameters:
- {Array} items
- an array of items to set
Event Detail
selectionChanged(selection)
- Parameters:
- {Array} selection
- the new value of the selection