Package is.codion.swing.framework.model
Interface SwingEntityEditor.SwingComponentModels
- All Superinterfaces:
EntityEditor.ComponentModels
- Enclosing class:
SwingEntityEditor
A SwingEntityEditor.SwingComponentModels extension providing foreign key based
EntityComboBoxModel and column based FilterComboBoxModel.
Override to customize combo box model creation.
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> FilterComboBoxModel<T> comboBoxModel(Column<T> column, EntityConnectionProvider connectionProvider) Creates a combo box model containing the current values of the given column.default EntityComboBoxModelcomboBoxModel(ForeignKey foreignKey, EntityConnectionProvider connectionProvider) Creates a newEntityComboBoxModelfor the given foreign key, override to provide a customEntityComboBoxModelimplementation.Methods inherited from interface is.codion.framework.model.EntityEditor.ComponentModels
searchModel
-
Method Details
-
comboBoxModel
default EntityComboBoxModel comboBoxModel(ForeignKey foreignKey, EntityConnectionProvider connectionProvider) Creates a new
EntityComboBoxModelfor the given foreign key, override to provide a customEntityComboBoxModelimplementation.This default implementation returns a sorted
EntityComboBoxModelusing the default null item caption if the underlying attribute is nullable.If the foreign key has select attributes defined, those are set in the combo box model.
- Parameters:
foreignKey- the foreign key for which to create aEntityComboBoxModelconnectionProvider- the connection provider- Returns:
- a
EntityComboBoxModelfor the given foreign key - See Also:
-
comboBoxModel
default <T> FilterComboBoxModel<T> comboBoxModel(Column<T> column, EntityConnectionProvider connectionProvider) Creates a combo box model containing the current values of the given column. This default implementation returns a sortedFilterComboBoxModelusing the default null item caption if the underlying column is nullable- Type Parameters:
T- the value type- Parameters:
column- the columnconnectionProvider- the connection provider- Returns:
- a combo box model based on the given column
- See Also:
-