public void setSelectedIndex(final int index, final boolean selected) { checkIndex(index); this.selectedIndex = index; final Update update = new Update(getID()); update.put(PROPERTY.SELECTED, selected); update.put(PROPERTY.SELECTED_INDEX, index); getUIContext().stackInstruction(update); }
public ListItem removeItem(final int index) { checkIndex(index); if (selectedItems.contains(index)) selectedItems.remove(Integer.valueOf(index)); final ListItem removedItem = items.remove(index); sendRemoveItemInstruction(index); return removedItem; }
public void setItemText(final int index, final String text) { checkIndex(index); items.get(index).label = text; final Update update = new Update(getID()); update.put(PROPERTY.ITEM_UPDATED); update.put(PROPERTY.INDEX, index); update.put(PROPERTY.ITEM_TEXT, text); getUIContext().stackInstruction(update); }
public Object getValue(final int index) { checkIndex(index); return items.get(index).value; }
public void setValue(final int index, final Object value) { checkIndex(index); items.get(index).value = value; }