Module is.codion.swing.framework.ui
Interface EditComponentFactory<T,C extends JComponent>
- Type Parameters:
T
- the value typeC
- the component type
- All Known Implementing Classes:
DefaultEditComponentFactory
public interface EditComponentFactory<T,C extends JComponent>
A factory for
ComponentValue
instances.-
Method Summary
Modifier and TypeMethodDescriptioncaption
(AttributeDefinition<T> attributeDefinition) Provides a way to override the default attribute caption, when presenting the component to the user.component
(SwingEntityEditModel editModel, T value) Provides an inputComponentValue
for editing a single attribute value for one or more entities.
-
Method Details
-
component
Provides an inputComponentValue
for editing a single attribute value for one or more entities.- Parameters:
editModel
- the edit model used to create foreign key input modelsvalue
- the initial value to display- Returns:
- a new
ComponentValue
instance handling input forattribute
-
caption
Provides a way to override the default attribute caption, when presenting the component to the user.- Parameters:
attributeDefinition
- the attribute definition- Returns:
- a caption to use when displaying the component, or an empty
Optional
for no caption
-