Module is.codion.common.model
Class AbstractItemComboBoxModelBuilder<T,B extends FilterComboBoxModel.ItemComboBoxModelBuilder<T,B>>
java.lang.Object
is.codion.common.model.component.combobox.AbstractItemComboBoxModelBuilder<T,B>
- Type Parameters:
T- the item typeB- the builder type
- All Implemented Interfaces:
FilterComboBoxModel.ItemComboBoxModelBuilder<T,B>
public abstract class AbstractItemComboBoxModelBuilder<T,B extends FilterComboBoxModel.ItemComboBoxModelBuilder<T,B>>
extends Object
implements FilterComboBoxModel.ItemComboBoxModelBuilder<T,B>
A base class for
FilterComboBoxModel.ItemComboBoxModelBuilder implementations. A toolkit builder extends this class,
adding its own options and overriding build() to wrap the FilterComboBoxModel in its own model.-
Constructor Details
-
AbstractItemComboBoxModelBuilder
- Parameters:
items- the items, a null item, if any, is used as the null item
-
-
Method Details
-
sorted
- Specified by:
sortedin interfaceFilterComboBoxModel.ItemComboBoxModelBuilder<T,B extends FilterComboBoxModel.ItemComboBoxModelBuilder<T, B>> - Parameters:
sorted- true if the items should be sorted, false by default- Returns:
- this builder instance
-
sorted
- Specified by:
sortedin interfaceFilterComboBoxModel.ItemComboBoxModelBuilder<T,B extends FilterComboBoxModel.ItemComboBoxModelBuilder<T, B>> - Parameters:
comparator- the comparator to sort by- Returns:
- this builder instance
-
selected
Description copied from interface:FilterComboBoxModel.ItemComboBoxModelBuilderSets the initially selected item- Specified by:
selectedin interfaceFilterComboBoxModel.ItemComboBoxModelBuilder<T,B extends FilterComboBoxModel.ItemComboBoxModelBuilder<T, B>> - Parameters:
selected- the item to select initially- Returns:
- this builder
-
selected
Description copied from interface:FilterComboBoxModel.ItemComboBoxModelBuilderSets the initially selected item- Specified by:
selectedin interfaceFilterComboBoxModel.ItemComboBoxModelBuilder<T,B extends FilterComboBoxModel.ItemComboBoxModelBuilder<T, B>> - Parameters:
selected- the item to select initially- Returns:
- this builder
-
build
- Specified by:
buildin interfaceFilterComboBoxModel.ItemComboBoxModelBuilder<T,B extends FilterComboBoxModel.ItemComboBoxModelBuilder<T, B>> - Returns:
- a new
FilterComboBoxModel
-
self
- Returns:
- this builder instance
-