Interface SwingEntityComboBoxModel
- All Superinterfaces:
ComboBoxModel<Entity>,EntityComboBoxModel,FilterComboBoxModel<Entity>,FilterModel<Entity>,ListModel<Entity>,SwingFilterComboBoxModel<Entity>
public interface SwingEntityComboBoxModel
extends EntityComboBoxModel, SwingFilterComboBoxModel<Entity>
A Swing ComboBoxModel based on an Entity — the Swing coat over the UI-agnostic
EntityComboBoxModel, adding the SwingFilterComboBoxModel interface (mirroring how
SwingFilterComboBoxModel relates to FilterComboBoxModel). All the entity logic (querying, filtering,
persistence-awareness) lives in EntityComboBoxModel; this only adds the Swing surface and a Swing-typed builder.
To filter use EntityComboBoxModel.filter() to set a Predicate or configure ForeignKey based filtering.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilds aSwingEntityComboBoxModel, theEntityComboBoxModel.Builderoptions.Nested classes/interfaces inherited from interface is.codion.framework.model.EntityComboBoxModel
EntityComboBoxModel.FilterNested classes/interfaces inherited from interface is.codion.common.model.component.combobox.FilterComboBoxModel
FilterComboBoxModel.ComboBoxItems<T>, FilterComboBoxModel.ItemComboBoxModelBuilder<T,B extends FilterComboBoxModel.ItemComboBoxModelBuilder<T, B>>, 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>Nested classes/interfaces inherited from interface is.codion.swing.common.model.component.combobox.SwingFilterComboBoxModel
SwingFilterComboBoxModel.SwingItemComboBoxModelBuilder<T> -
Field Summary
Fields inherited from interface is.codion.framework.model.EntityComboBoxModel
PERSISTENCE_AWAREFields inherited from interface is.codion.common.model.component.combobox.FilterComboBoxModel
NULL_CAPTIONFields inherited from interface is.codion.common.model.filter.FilterModel
ASYNC, REFRESH_DELAY -
Method Summary
Static MethodsModifier and TypeMethodDescriptionbuilder()static SwingEntityComboBoxModelmodel(EntityComboBoxModel model) Returns aSwingEntityComboBoxModelbased on the givenEntityComboBoxModel, the given model itself in case it is one already.Methods inherited from interface javax.swing.ComboBoxModel
getSelectedItem, setSelectedItemMethods inherited from interface is.codion.framework.model.EntityComboBoxModel
condition, connection, entityDefinition, filter, select, selectorMethods 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
SwingEntityComboBoxModel.Builder.EntityTypeStepinstance
-
model
Returns aSwingEntityComboBoxModelbased on the givenEntityComboBoxModel, the given model itself in case it is one already.- Parameters:
model- the model to base the Swing combo box model on- Returns:
- a
SwingEntityComboBoxModelbased on the given model
-