Class EntityEditPanel.Config

java.lang.Object
is.codion.swing.framework.ui.EntityEditPanel.Config
Enclosing class:
EntityEditPanel

public static final class EntityEditPanel.Config extends Object
Contains configuration settings for a EntityEditPanel which must be set before the panel is initialized.
  • Field Details

    • USE_SAVE_CAPTION

      public static final PropertyValue<Boolean> USE_SAVE_CAPTION
      Specifies whether the add/insert button caption should be 'Save' (mnemonic S), instead of 'Add' (mnemonic A)
      Value type: Boolean
      Default value: false
    • INCLUDE_ENTITY_MENU

      public static final PropertyValue<Boolean> INCLUDE_ENTITY_MENU
      Specifies whether to include a EntityPopupMenu on this edit panel, triggered with CTRL-ALT-V by default.
      Value type: Boolean
      Default value: true
    • USE_FOCUS_ACTIVATION

      public static final PropertyValue<Boolean> USE_FOCUS_ACTIVATION
      Specifies whether edit panels should be activated when the panel (or its parent EntityPanel) receives focus
      Value type: Boolean
      Default value: true
    • MODIFIED_WARNING

      public static final PropertyValue<Boolean> MODIFIED_WARNING
      Indicates whether the panel should ask for confirmation before discarding unsaved modifications
      Value type: Boolean
      Default value: false
  • Method Details

    • editPanel

      public EntityEditPanel editPanel()
      Returns:
      the edit panel
    • keyStroke

      public EntityEditPanel.Config keyStroke(ControlKey<?> controlKey, Consumer<Value<KeyStroke>> keyStroke)
      Parameters:
      controlKey - the control key
      keyStroke - provides access to the Value controlling the key stroke for the given control
      Returns:
      this Config instance
    • clearAfterInsert

      public EntityEditPanel.Config clearAfterInsert(boolean clearAfterInsert)
      Parameters:
      clearAfterInsert - controls whether the UI should be cleared after insert has been performed
      Returns:
      this Config instance
    • requestFocusAfterInsert

      public EntityEditPanel.Config requestFocusAfterInsert(boolean requestFocusAfterInsert)
      Parameters:
      requestFocusAfterInsert - controls whether the UI should request focus after insert has been performed
      Returns:
      this Config instance
      See Also:
    • referentialIntegrityErrorHandling

      public EntityEditPanel.Config referentialIntegrityErrorHandling(ReferentialIntegrityErrorHandling referentialIntegrityErrorHandling)
      Parameters:
      referentialIntegrityErrorHandling - controls which action to take on a referential integrity error on delete
      Returns:
      this Config instance
    • focusActivation

      public EntityEditPanel.Config focusActivation(boolean focusActivation)
      Parameters:
      focusActivation - true if the edit panel should be activated when it or its parent EntityPanel receives focus
      Returns:
      this Config instance
      See Also:
    • includeEntityMenu

      public EntityEditPanel.Config includeEntityMenu(boolean includeEntityMenu)
      Parameters:
      includeEntityMenu - true if a entity menu should be included
      Returns:
      this Config instance
      See Also:
    • modifiedWarning

      public EntityEditPanel.Config modifiedWarning(boolean modifiedWarning)
      Parameters:
      modifiedWarning - specifies whether this edit panel presents a warning before discarding unsaved modifications
      See Also:
    • insertConfirmer

      public EntityEditPanel.Config insertConfirmer(EntityEditPanel.Confirmer insertConfirmer)
      Parameters:
      insertConfirmer - the insert confirmer
      Returns:
      this Config instance
    • deleteConfirmer

      public EntityEditPanel.Config deleteConfirmer(EntityEditPanel.Confirmer deleteConfirmer)
      Parameters:
      deleteConfirmer - the delete confirmer
      Returns:
      this Config instance
    • updateConfirmer

      public EntityEditPanel.Config updateConfirmer(EntityEditPanel.Confirmer updateConfirmer)
      Parameters:
      updateConfirmer - the update confirmer
      Returns:
      this Config instance