Module is.codion.swing.framework.ui
Package is.codion.swing.framework.ui
Class EntityEditComponentPanel.InputFocus.Initial
java.lang.Object
is.codion.swing.framework.ui.EntityEditComponentPanel.InputFocus.Initial
- Enclosing class:
EntityEditComponentPanel.InputFocus
Manages the component that should receive the initial focus when the panel is activated.
-
Method Summary
Modifier and TypeMethodDescriptionget()Returns the component which should receive the initial focus, which by default is the one specified viaset(Supplier)orset(JComponent).voidrequest()Requests the initial focus, using the component returned byget().voidSets the component associated with the given attribute as the component that should receive the initial focus in this edit panel.voidset(Supplier<@Nullable JComponent> component) Sets theSuppliersupplying the component that should receive the focus when this edit panel is cleared or activated.voidset(JComponent component) Sets the component that should receive the focus when this edit panel is cleared or activated.
-
Method Details
-
get
Returns the component which should receive the initial focus, which by default is the one specified viaset(Supplier)orset(JComponent). The fallback is the default component as defined by the focus traversal policy, or if this panel contains no fousable components, the panel itself.- Returns:
- the initial focus component
-
set
Sets the component that should receive the focus when this edit panel is cleared or activated.
- Parameters:
component- the component that should receive the focus when this edit panel is cleared or activated
-
set
Sets the component associated with the given attribute as the component that should receive the initial focus in this edit panel.- Parameters:
attribute- the attribute which component should receive the focus this edit panel is cleared or activated
-
set
Sets the
Suppliersupplying the component that should receive the focus when this edit panel is cleared or activated.- Parameters:
component- supplies the component that should receive the focus when this edit panel is cleared or activated
-
request
public void request()Requests the initial focus, using the component returned by
get().Note that if this panel is not visible then calling this method has no effect.
- See Also:
-