Interface IStringArrayContainer
- All Known Subinterfaces:
- ICodeItemArrayContainer
- All Known Implementing Classes:
- CodeItemArrayProp,- EUIComboBox,- EUISpinner,- UIAbstractListChoice,- UIComboBox,- UISpinner
- Author:
- Christopher Mindus
- Method SummaryModifier and TypeMethodDescription- default voidAdds a new item.- default voidAdds a new items.- default intGets the item count.- default String[]Gets the array of elements as String's.- default String- getItemString- (int index) Gets the element at the specified index as a String.- default IStringArrayContainerGets the target implementor of the interface.- default void- insertItem- (String item, int index) Inserts an item at specified index.- default voidRemoves all items.- default void- removeAllItems- (boolean keepSelection) Removes all items but keeps the selection depending on the flag.- default Object- removeItem- (int index) Removes an item.- default int- removeItem- (String item) Removes an item.- default StringSets an item at specified index.- default voidSorts the list according to the default JVM locale case sensitively.- default void- sortItems- (boolean isCaseInsensitive) Sorts the list according to the default JVM locale.- default voidSorts the list according to a locale case sensitively.- default voidSorts the list according to a locale.
- Method Details- getStringArrayContainerGets the target implementor of the interface.- Returns:
- The target implements of the interface, null for none (this instance).
 
- getItemsAsStringsGets the array of elements as String's.
- getItemStringGets the element at the specified index as a String.- Parameters:
- index- The index.
- Returns:
- The element.
- Throws:
- IndexOutOfBoundsException- If the index is invalid.
 
- getItemCountdefault int getItemCount()Gets the item count.- Returns:
- The count of items.
 
- sortItemsdefault void sortItems()Sorts the list according to the default JVM locale case sensitively.- The selected index may change as a result of the sorting if selection is supported. - Throws:
- IllegalStateException- If the container is read-only.
 
- sortItemsdefault void sortItems- (boolean isCaseInsensitive) Sorts the list according to the default JVM locale.- The selected index may change as a result of the sorting if selection is supported. - Parameters:
- isCaseInsensitive- Flag for case insensitive.
- Throws:
- IllegalStateException- If the container is read-only.
 
- sortItemsSorts the list according to a locale case sensitively.- The selected index may change as a result of the sorting if selection is supported. - Parameters:
- locale- The locale to use for string sorting.
- Throws:
- IllegalStateException- If the container is read-only.
 
- sortItemsSorts the list according to a locale.- The selected index may change as a result of the sorting if selection is supported. - Parameters:
- locale- The locale to use for string sorting, null for default..
- isCaseInsensitive- Flag for case insensitive.
- Throws:
- IllegalStateException- If the container is read-only.
 
- addItemAdds a new item.- Parameters:
- item- The item to add.
- Throws:
- NullPointerException- If the item is null.
- IllegalStateException- If the container is read-only.
 
- addItemsAdds a new items.- Parameters:
- items- The items to add.
- Throws:
- NullPointerException- If an item is null.
- IllegalStateException- If the container is read-only.
 
- insertItemInserts an item at specified index.- The selection may be changed due to this operation if the owner support selection. - Parameters:
- item- The item to add.
- index- The index to insert the item before (-1 for last).
- Throws:
- NullPointerException- If the item is null.
- IndexOutOfBoundsException- If the index is in error.
- IllegalStateException- If the container is read-only.
 
- setItemSets an item at specified index.- Parameters:
- item- The item to set.
- index- The index of the item.
- Returns:
- The old item.
- Throws:
- NullPointerException- If the item is null.
- IndexOutOfBoundsException- If the index is in error.
- IllegalStateException- If the container is read-only.
 
- removeItemRemoves an item.- The selection may be changed due to this operation if the owner support selection. - Parameters:
- index- The index of the item to delete.
- Returns:
- The item deleted.
- Throws:
- IndexOutOfBoundsException- If the index is in error.
- IllegalStateException- If the container is read-only.
 
- removeItemRemoves an item.- The selection may be changed due to this operation if the owner support selection. - Parameters:
- item- The item to remove.
- Returns:
- The index of the item removed, -1 if not found.
- Throws:
- IndexOutOfBoundsException- If the index is in error.
- IllegalStateException- If the container is read-only.
 
- removeAllItemsdefault void removeAllItems()Removes all items.- The selection may be changed (cleared) due to this operation if the owner support selection. - Throws:
- IllegalStateException- If the container is read-only.
 
- removeAllItemsdefault void removeAllItems- (boolean keepSelection) Removes all items but keeps the selection depending on the flag.- The selection may be changed (cleared) due to this operation if the owner support selection. - Parameters:
- keepSelection- The boolean to keep the selection.
- Throws:
- IllegalStateException- If the container is read-only.