Module is.codion.swing.common.model
Interface FilterComboBoxModel<T>
- Type Parameters:
T- the type of values in this combo box model
- All Superinterfaces:
ComboBoxModel<T>,is.codion.common.model.FilterModel<T>,ListModel<T>
- All Known Implementing Classes:
ItemComboBoxModel
public interface FilterComboBoxModel<T>
extends is.codion.common.model.FilterModel<T>, ComboBoxModel<T>
A combo box model based on
FilterModel.- See Also:
-
filterComboBoxModel()FilterModel.VisibleItems.predicate()
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfacestatic interfaceResponsible for finding an item of typeFilterComboBoxModel.ItemFinderby a single value of typeFilterComboBoxModel.ItemFinder.static interfaceSpecifies the item that should represent null for providing a caption.Nested classes/interfaces inherited from interface is.codion.common.model.FilterModel
is.codion.common.model.FilterModel.AbstractRefresher<T extends Object>, is.codion.common.model.FilterModel.FilteredItems<T extends Object>, is.codion.common.model.FilterModel.Items<T extends Object>, is.codion.common.model.FilterModel.Refresher<T extends Object>, is.codion.common.model.FilterModel.VisibleItems<T extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final is.codion.common.property.PropertyValue<String>Specifies the caption used by default to represent the null item in combo box models.Fields inherited from interface is.codion.common.model.FilterModel
ASYNC_REFRESH -
Method Summary
Modifier and TypeMethodDescription<V> is.codion.common.value.Value<V>createSelectorValue(FilterComboBoxModel.ItemFinder<T, V> itemFinder) static <T> FilterComboBoxModel<T>items()Methods inherited from interface javax.swing.ComboBoxModel
setSelectedItemMethods inherited from interface is.codion.common.model.FilterModel
refresh, refresh, refresherMethods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
-
Field Details
-
NULL_CAPTION
Specifies the caption used by default to represent the null item in combo box models.- Value type: String
- Default value: -
-
-
Method Details
-
items
FilterComboBoxModel.ComboBoxItems<T> items()- Specified by:
itemsin interfaceis.codion.common.model.FilterModel<T>
-
selection
FilterComboBoxModel.ComboBoxSelection<T> selection()- Specified by:
selectionin interfaceis.codion.common.model.FilterModel<T>
-
getSelectedItem
T getSelectedItem()- Specified by:
getSelectedItemin interfaceComboBoxModel<T>- Returns:
- the selected item, N.B. this can include the
nullItemin case it has been set viaFilterComboBoxModel.ComboBoxItems.nullItem(),FilterComboBoxModel.ComboBoxSelection.value()is usually what you want
-
createSelectorValue
<V> is.codion.common.value.Value<V> createSelectorValue(FilterComboBoxModel.ItemFinder<T, V> itemFinder) - Type Parameters:
V- the value type- Parameters:
itemFinder- responsible for finding the item to select- Returns:
- a
Valuelinked to the selected item using the givenFilterComboBoxModel.ItemFinderinstance
-
filterComboBoxModel
- Type Parameters:
T- the item type- Returns:
- a new
FilterComboBoxModelinstance
-