Module is.codion.swing.common.model
Class ItemComboBoxModel
java.lang.Object
is.codion.swing.common.model.component.combobox.ItemComboBoxModel
Provides a
ItemComboBoxModel.Builder
for FilterComboBoxModel
implementations based on the Item
class.
Note that item combo box models are unsorted by default, the provided items are assumed to be ordered.
Use ItemComboBoxModel.Builder.sorted(boolean)
or ItemComboBoxModel.Builder.sorted(Comparator)
for a sorted combo box model.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionbooleanItems
(String nullCaption) booleanItems
(String nullCaption, String trueCaption, String falseCaption) static <T> ItemComboBoxModel.Builder<T>
Returns aItemComboBoxModel.Builder
, by default unsorted.
-
Method Details
-
builder
Returns aItemComboBoxModel.Builder
, by default unsorted.- Type Parameters:
T
- the item type- Parameters:
items
- the items to display in the model- Returns:
- a new
ItemComboBoxModel.Builder
-
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
- See Also:
-
booleanItems
public 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
-