Package is.codion.swing.framework.model
Interface SwingEntityEditor.SwingComponentModels
- All Superinterfaces:
EntityEditor.ComponentModels<SwingEntityModel,SwingEntityEditModel, SwingEntityTableModel, SwingEntityEditor>
- Enclosing class:
SwingEntityEditor
public static interface SwingEntityEditor.SwingComponentModels
extends EntityEditor.ComponentModels<SwingEntityModel,SwingEntityEditModel,SwingEntityTableModel,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, SwingEntityEditor editor) Creates a combo box model containing the current values of the given column.default EntityComboBoxModelcomboBoxModel(ForeignKey foreignKey, SwingEntityEditor editor) 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
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 aEntityComboBoxModeleditor- the editor- Returns:
- a
EntityComboBoxModelfor the given foreign key - See Also:
-
comboBoxModel
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 columneditor- the editor- Returns:
- a combo box model based on the given column
- See Also:
-