Lines Matching defs:index

87      * The index of the current choice for this <code>Choice</code>
167 * Gets the string at the specified index in this
169 * @param index the index at which to begin
172 public String getItem(int index) {
173 return getItemImpl(index);
180 final String getItemImpl(int index) {
181 return (String)pItems.elementAt(index);
219 * @param index the new item position
223 private void insertNoInvalidate(String item, int index) {
228 pItems.insertElementAt(item, index);
231 peer.add(item, index);
234 if (selectedIndex < 0 || selectedIndex >= index) {
242 * Existing items at an index greater than or equal to
243 * <code>index</code> are shifted up by one to accommodate
244 * the new item. If <code>index</code> is greater than or
255 * @param index the position at which the item should be inserted
256 * @exception IllegalArgumentException if index is less than 0
258 public void insert(String item, int index) {
260 if (index < 0) {
261 throw new IllegalArgumentException("index less than zero.");
263 /* if the index greater than item count, add item to the end */
264 index = Math.min(index, pItems.size());
266 insertNoInvalidate(item, index);
279 * item remains selected (and the selected index is
288 int index = pItems.indexOf(item);
289 if (index < 0) {
293 removeNoInvalidate(index);
307 * item remains selected (and the selected index is
390 * Returns the index of the currently selected item.
393 * @return the index of the currently selected item, or -1 if nothing
435 * the one with the smallest index is selected.
448 int index = pItems.indexOf(str);
449 if (index >= 0) {
450 select(index);
790 * @param i zero-based index of the actions
801 * @param i zero-based index of actions