/** Deselects the currently selected items and selects * the item with the given index. * <p>Note: if the label of comboitem has the same more than one, the first * comboitem will be selected at client side, it is a limitation of {@link Combobox} * and it is different from {@link Listbox}.</p> * @since 3.0.2 */ public void setSelectedIndex(int jsel) { if (jsel >= getItemCount()) throw new UiException("Out of bound: " + jsel + " while size=" + getItemCount()); if (jsel < -1) jsel = -1; setSelectedItem(jsel >= 0 ? getItemAtIndex(jsel) : null); //Bug#2919037: setSelectedIndex(-1) shall unselect even with constraint }
if (index >= 0 && cbbox.getItemCount() > index) { final Comboitem item = cbbox.getItemAtIndex(index);
return; final ListModel _model = getModel(); final int newsz = _model.getSize(), oldsz = getItemCount(); int min = event.getIndex0(), max = event.getIndex1(), cnt;