Package is.codion.swing.framework.model
Class SwingEntityEditor.ComboBoxModels
java.lang.Object
is.codion.swing.framework.model.SwingEntityEditor.ComboBoxModels
- Enclosing class:
SwingEntityEditor
Manages the combo box models used by a
SwingEntityEditor.-
Method Summary
Modifier and TypeMethodDescriptionMap<Column<?>, 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.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
Returns the foreign key based combo box models initialized viaget(ForeignKey).- Returns:
- an unmodifiable view of the foreign key based combo box models
-
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 a 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:
-