List.setSelection

Selects the items at the given zero-relative indices in the receiver. The current selection is cleared before the new items are selected. <p> Indices that are out of range and duplicate indices are ignored. If the receiver is single-select and multiple indices are specified, then all indices are ignored.

@param indices the indices of the items to select

@exception SWTException <ul> <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> </ul>

@see List#deselectAll() @see List#select(int[])

Meta