[]
IItemCollection<T>, Iterable<T>IDropDownItemList, IListBoxItemListISelector. This interface extends IItemCollection with zero-based indexed access and update operations, and also supports locating, inserting, and removing items by index. It is typically obtained from a selector control such as a drop-down or list box through ISelectorT.getItems().
IDropDown dropDown = worksheet.getControls().addDropDown(20, 20, 120, 24);
IItemList<DropDownItem> items = dropDown.getItems();
items.add(new DropDownItem("Low"));
items.add(new DropDownItem("High"));
items.set(1, new DropDownItem("Medium"));
get(int index) intvoidvoidremoveAt(int index) voidadd, clear, contains, getCount, removeforEach, iterator, spliteratorUse this method to retrieve an item from an IItemList by position. The returned object is the item stored at the specified index in the collection.
IDropDown dropDown = worksheet.getControls().addDropDown(20, 20, 120, 20);
dropDown.getItems().add(new DropDownItem("Low"));
dropDown.getItems().add(new DropDownItem("High"));
DropDownItem item = dropDown.getItems().get(0);
index - The zero-based index of the item.IndexOutOfBoundsException - if index is less than 0 or greater than or equal to the number of items in the collection.Use this method to replace the existing item stored at the specified position in the collection.
IDropDown dropDown = worksheet.getControls().addDropDown(20, 20, 120, 20);
IItemList<DropDownItem> items = dropDown.getItems();
items.add(new DropDownItem("Low"));
items.add(new DropDownItem("High"));
items.set(1, new DropDownItem("Medium"));
index - The zero-based index of the item.value - The object is being set to the specified index.IndexOutOfBoundsException - if index is less than 0 or greater than or equal to the number of items in the collection.IllegalStateException - if the collection is read-only.The returned index is zero-based.
IDropDown dropDown = worksheet.getControls().addDropDown(20, 20, 120, 20);
IItemList<DropDownItem> items = dropDown.getItems();
items.add(new DropDownItem("Low"));
items.add(new DropDownItem("High"));
int index = items.indexOf(items.get(1));
item - The object to look for in the collection.Use this method to add an item at a zero-based position in an IItemList. The inserted item is placed before the element currently at index, and the following items are shifted to the next positions.
IDropDown dropDown = worksheet.getControls().addDropDown(20, 20, 120, 20);
IItemList<DropDownItem> items = dropDown.getItems();
items.add(new DropDownItem("Low"));
items.add(new DropDownItem("High"));
items.insert(1, new DropDownItem("Medium"));
index - The zero-based index at which to insert the item.item - The item to insert. Must not be null.IndexOutOfBoundsException - if index is less than 0 or greater than the number of items in the collection.NullPointerException - if item is null.IllegalStateException - if the collection is read-only.Use this method to remove an item from an IItemList by its zero-based position.
IDropDown dropDown = worksheet.getControls().addDropDown(20, 20, 120, 20);
IItemList<DropDownItem> items = dropDown.getItems();
items.add(new DropDownItem("Low"));
items.add(new DropDownItem("High"));
items.removeAt(0);
index - The zero-based index of the element to remove.IndexOutOfBoundsException - if index is less than 0 or greater than or equal to the number of items in the collection.IllegalStateException - if the collection is read-only.