org.jminor.common.model.combobox
Interface FilteredComboBoxModel<T>
- All Superinterfaces:
- ComboBoxModel, FilteredModel<T>, ListModel, Refreshable
- All Known Subinterfaces:
- EntityComboBoxModel
- All Known Implementing Classes:
- DefaultEntityComboBoxModel, DefaultFilteredComboBoxModel, DefaultPropertyComboBoxModel
public interface FilteredComboBoxModel<T>
- extends FilteredModel<T>, ComboBoxModel, Refreshable
A ComboBoxModel extension that allows filtering via FilterCriteria objects.
- See Also:
FilterCriteria
,
FilteredModel.setFilterCriteria(org.jminor.common.model.FilterCriteria)
Methods inherited from interface org.jminor.common.model.FilteredModel |
addFilteringListener, contains, filterContents, getAllItems, getFilterCriteria, getFilteredItemCount, getFilteredItems, getVisibleItemCount, getVisibleItems, isFiltered, isVisible, removeFilteringListener, setFilterCriteria |
addSelectionListener
void addSelectionListener(ActionListener listener)
- Parameters:
listener
- a listener notified each time the selection changes
removeSelectionListener
void removeSelectionListener(ActionListener listener)
- Parameters:
listener
- a selection listener to remove
setContents
void setContents(Collection<T> contents)
- Parameters:
contents
- the contents to display in this combo box model
addItem
void addItem(T item)
- Parameters:
item
- the item to add
removeItem
void removeItem(T item)
- Removes the given item from this model
- Parameters:
item
- the item to remove
isCleared
boolean isCleared()
- Returns:
- true if the model data needs to be refreshed
isNullValueSelected
boolean isNullValueSelected()
- Returns:
- true if a value representing null is selected
setNullValueString
void setNullValueString(String nullValueString)
- Sets the nullValueItem, a refresh is required for it to show up
- Parameters:
nullValueString
- a String representing a null value
getNullValueString
String getNullValueString()
- Returns:
- the String representing the null value, null if none has been specified