Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityEditor.ComboBoxModels
- All Known Subinterfaces:
SwingEntityEditor.SwingComboBoxModels
- All Known Implementing Classes:
AbstractEntityEditor.DefaultComboBoxModels
- Enclosing interface:
EntityEditor<R extends EntityEditor<R>>
public static interface EntityEditor.ComboBoxModels
Manages the
FilterComboBoxModels used by a EntityEditor-
Method Summary
Modifier and TypeMethodDescriptionMap<Column<?>, ? extends FilterComboBoxModel<?>> column()Returns the column based combo box models initialized viaget(Column).<T> FilterComboBoxModel<T> Creates a combo box model containing the current values of the given column.create(ForeignKey foreignKey) Creates a newEntityComboBoxModelfor the given foreign key.Map<ForeignKey, ? extends EntityComboBoxModel> Returns the foreign key based combo box models initialized viaget(ForeignKey).<T> FilterComboBoxModel<T> Returns theFilterComboBoxModelassociated with the given column.get(ForeignKey foreignKey) Returns theEntityComboBoxModelassociated with the given foreign key.voidinitialize(Attribute<?>... attributes) Creates and refreshes combo box models for the given attributes.
-
Method Details
-
foreignKey
Map<ForeignKey,? extends EntityComboBoxModel> foreignKey()Returns the foreign key based combo box models initialized viaget(ForeignKey).- Returns:
- an unmodifiable view of the foreign key based combo box models
-
column
Map<Column<?>,? extends FilterComboBoxModel<?>> column()Returns the column based combo box models initialized viaget(Column).- Returns:
- an unmodifiable view of the column based combo box models
-
initialize
Creates and refreshes combo box models for the given attributes. Doing this in an edit model constructor avoids the models being refreshed when the combo boxes using them are initialized- Parameters:
attributes- the attributes for which to initialize combo box models- See Also:
-
get
Returns the
EntityComboBoxModelassociated with the given foreign key. If no such combo box model exists, one is created by callingcreate(ForeignKey).This method always returns the same
EntityComboBoxModelinstance, once one has been created.- Parameters:
foreignKey- the foreign key- Returns:
- the
EntityComboBoxModelassociated with the given foreign key - See Also:
-
get
Returns the
FilterComboBoxModelassociated with the given column. If no such combo box model exists, one is created by callingcreate(Column).This method always returns the same
FilterComboBoxModelinstance, once one has been created.- Type Parameters:
T- the value type- Parameters:
column- the column- Returns:
- the
FilterComboBoxModelassociated with the given column - See Also:
-
create
Creates a new
EntityComboBoxModelfor the given foreign key.- Parameters:
foreignKey- the foreign key for which to create aEntityComboBoxModel- Returns:
- a
EntityComboBoxModelfor the given foreign key - See Also:
-
create
Creates a combo box model containing the current values of the given column.- Type Parameters:
T- the value type- Parameters:
column- the column- Returns:
- a combo box model based on the given column
- See Also:
-