Class EntityEditComponentPanel.InputFocus.Initial

java.lang.Object
is.codion.swing.framework.ui.EntityEditComponentPanel.InputFocus.Initial
Enclosing class:
EntityEditComponentPanel.InputFocus

public final class EntityEditComponentPanel.InputFocus.Initial extends Object
Manages the component that should receive the initial focus when the panel is activated.
  • Method Details

    • get

      public JComponent get()
      Returns the component which should receive the initial focus, which by default is the one specified via set(Supplier) or set(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

      public void set(JComponent component)

      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

      public void set(Attribute<?> attribute)
      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

      public void set(Supplier<@Nullable JComponent> component)

      Sets the Supplier supplying 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: