Module is.codion.swing.common.model
Interface SwingFilterComboBoxModel<T>
- Type Parameters:
T- the type of values in this combo box model
- All Superinterfaces:
ComboBoxModel<T>,FilterComboBoxModel<T>,FilterModel<T>,ListModel<T>
- All Known Subinterfaces:
SwingEntityComboBoxModel
A Swing
ComboBoxModel based on the UI-agnostic
FilterComboBoxModel, adding the ComboBoxModel
interface — mirroring how SwingFilterTableModel extends TableModel. The rich model logic
(items, selection, filtering) lives in the common module; this only adds the Swing coat.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilds a SwingSwingFilterComboBoxModel— the same options as the commonFilterComboBoxModel.Builder(the refresher is managed internally as aProgressWorkerbased one), but the chain stays Swing-typed sobuild()yields aComboBoxModel.static interfaceBuilds a SwingSwingFilterComboBoxModelbased on theItemclass.Nested classes/interfaces inherited from interface is.codion.common.model.component.combobox.FilterComboBoxModel
FilterComboBoxModel.ComboBoxItems<T>, FilterComboBoxModel.ItemComboBoxModelBuilder<T>, FilterComboBoxModel.ItemFinder<T,V> Nested classes/interfaces inherited from interface is.codion.common.model.filter.FilterModel
FilterModel.FilteredItems<T>, FilterModel.IncludedItems<T>, FilterModel.IncludePredicate<T>, FilterModel.Items<T>, FilterModel.Refresher<T>, FilterModel.Sort<T> -
Field Summary
Fields inherited from interface is.codion.common.model.component.combobox.FilterComboBoxModel
NULL_CAPTIONFields inherited from interface is.codion.common.model.filter.FilterModel
ASYNC -
Method Summary
Static MethodsModifier and TypeMethodDescriptionbooleanItems(String nullCaption) booleanItems(String nullCaption, String trueCaption, String falseCaption) builder()static <T> SwingFilterComboBoxModel<T> model(FilterComboBoxModel<T> model) Wraps the given UI-agnosticFilterComboBoxModelwith the SwingComboBoxModelcoat — used to give an already-built common model (e.g.Methods inherited from interface javax.swing.ComboBoxModel
getSelectedItem, setSelectedItemMethods inherited from interface is.codion.common.model.component.combobox.FilterComboBoxModel
items, selectedItem, selectorMethods inherited from interface is.codion.common.model.filter.FilterModel
selection, sortMethods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
-
Method Details
-
builder
- Returns:
- a new
SwingFilterComboBoxModel.Builder.ItemsStepinstance
-
model
Wraps the given UI-agnosticFilterComboBoxModelwith the SwingComboBoxModelcoat — used to give an already-built common model (e.g. an entity combo box model) itsComboBoxModelsurface without rebuilding it.- Type Parameters:
T- the item type- Parameters:
model- the model to wrap- Returns:
- a new
SwingFilterComboBoxModeldelegating to the given model
-
booleanItems
- Returns:
- items for null, true and false, using the default captions
- See Also:
-
booleanItems
- Parameters:
nullCaption- the caption for the null value- Returns:
- items for null, true and false, using the given null caption and the default true/false captions
-
booleanItems
static List<Item<Boolean>> booleanItems(String nullCaption, String trueCaption, String falseCaption) - Parameters:
nullCaption- the caption for nulltrueCaption- the caption for truefalseCaption- the caption for false- Returns:
- items for null, true and false
-