Interface LazyLoadComboBoxModel<T>
-
- Type Parameters:
T
- the class of the combo box items
- All Superinterfaces:
javax.swing.ComboBoxModel<T>
,java.lang.Iterable<T>
,javax.swing.ListModel<T>
- All Known Subinterfaces:
SuggestModel<T>
- All Known Implementing Classes:
BeanListComboBoxModel
,FileSuggestModel
,PredicateSuggestModel
public interface LazyLoadComboBoxModel<T> extends javax.swing.ComboBoxModel<T>, java.lang.Iterable<T>
A combo box model that supports loading the list items lazily.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addElement(T item)
Append an item to the list.void
addMissingElements(java.util.Collection<? extends T> items)
Add items to the list, skipping items that are already in the list.int
indexOf(java.lang.Object item)
Get the index of an item in the list.void
setElements(java.util.Collection<? extends T> items, boolean keepSelection)
Replace the items in the list.
-
-
-
Method Detail
-
setElements
void setElements(java.util.Collection<? extends T> items, boolean keepSelection)
Replace the items in the list.- Parameters:
items
- the new itemskeepSelection
- if true then the selected item is not changed, if false then the selected item is cleared if it is not initems
-
addElement
void addElement(T item)
Append an item to the list.- Parameters:
item
- the item to append
-
addMissingElements
void addMissingElements(java.util.Collection<? extends T> items)
Add items to the list, skipping items that are already in the list.- Parameters:
items
- the items to add
-
indexOf
int indexOf(java.lang.Object item)
Get the index of an item in the list.- Returns:
- the index of the item or -1 if it is not in the list
-
-