TreeSelection
This object is available to unprivileged JavaScript. It implements the following interfaces:
Properties
readonly PRInt32 count
The number of rows currently selected in this tree.
PRInt32 currentIndex
The current item (the one that gets a focus rect in addition to being selected).
boolean selectEventsSuppressed
This attribute is a boolean indicating whether or not the "select" event should fire when the selection is changed using one of our methods. A view can use this to temporarily suppress the selection while manipulating all of the indices, e.g., on a sort.
readonly PRInt32 shiftSelectPivot
The selection "pivot". This is the first item the user selected as part of a ranged select.
readonly boolean single
This attribute is a boolean indicating single selection.
TreeBoxObject tree
The tree widget for this selection.
Methods
void adjustSelection ( PRInt32 index , PRInt32 count )
void clearRange ( PRInt32 startIndex , PRInt32 endIndex )
void clearSelection ( )
void getRangeAt ( PRInt32 i , out PRInt32 min , out PRInt32 max )
PRInt32 getRangeCount ( )
void invalidateSelection ( )
void invertSelection ( )
boolean isSelected ( PRInt32 index )
void rangedSelect ( PRInt32 startIndex , PRInt32 endIndex , boolean augment )
void select ( PRInt32 index )
void selectAll ( )
void timedSelect ( PRInt32 index , PRInt32 delay )
void toggleSelect ( PRInt32 index )
void adjustSelection ( PRInt32 index , PRInt32 count )
Called when the row count changes to adjust selection indices.
- Arguments:
- index
- count
void clearRange ( PRInt32 startIndex , PRInt32 endIndex )
Clears the range.
- Arguments:
- startIndex
- endIndex
boolean isSelected ( PRInt32 index )
Indicates whether or not the row at the specified index is part of the selection.
- Arguments:
- index
void rangedSelect ( PRInt32 startIndex , PRInt32 endIndex , boolean augment )
Select the range specified by the indices. If augment is true, then we add the range to the selection without clearing out anything else. If augment is false, everything is cleared except for the specified range.
- Arguments:
- startIndex
- endIndex
- augment
Deselect all rows and select the row at the specified index.
- Arguments:
- index
void toggleSelect ( PRInt32 index )
Toggle the selection state of the row at the specified index.
- Arguments:
- index
Reference documentation is generated from Mozilla's source.
