Module is.codion.swing.framework.ui
Package is.codion.swing.framework.ui
Interface EntityEditComponentPanel.EditorComponent<T>
- Type Parameters:
T- the value type
- Enclosing class:
EntityEditComponentPanel
protected static interface EntityEditComponentPanel.EditorComponent<T>
Species the component used to edit an attribute
-
Method Summary
Modifier and TypeMethodDescriptionget()label()optional()voidreplace(JComponent component) Replaces an already set component.voidset(ComponentValue<? extends JComponent, T> componentValue) Sets the component and links the value with the underlying editor valuevoidset(JComponent component) Note that when setting the component directly using this method, no value linking is performed.
-
Method Details
-
get
JComponent get()- Returns:
- the component
- Throws:
IllegalStateException- in case no component has been set
-
optional
Optional<JComponent> optional()- Returns:
- the component or an empty Optional in case none has been set
-
set
Note that when setting the component directly using this method, no value linking is performed.- Parameters:
component- the component- Throws:
IllegalStateException- in case the component has already been set- See Also:
-
set
Sets the component and links the value with the underlying editor value- Parameters:
componentValue- the component value
-
replace
Replaces an already set component. Note that when replacing the component using this method, no value linking is performed.- Parameters:
component- the component- Throws:
IllegalStateException- in case no component has been previously set- See Also:
-
label
JLabel label()- Returns:
- the label associated with the component
- Throws:
IllegalStateException- in case no component has been set or if no label is associated with it- See Also:
-