Class EntityPanel.Settings

java.lang.Object
is.codion.swing.framework.ui.EntityPanel.Settings
Enclosing class:
EntityPanel

public final class EntityPanel.Settings extends Object
Contains configuration settings for a EntityPanel which must be set before the panel is initialized.
  • Method Details

    • toolbarControls

      public EntityPanel.Settings toolbarControls(boolean toolbarControls)
      Parameters:
      toolbarControls - true if the edit controls should be on a toolbar instead of a button panel
      Returns:
      this Settings instance
      Throws:
      IllegalStateException - if the panel has been initialized
      See Also:
    • controlComponentConstraints

      public EntityPanel.Settings controlComponentConstraints(String controlComponentConstraints)
      Sets the layout constraints to use for the control panel
       The default layout is as follows (BorderLayout.WEST):
       __________________________________
       |   edit panel           |control|
       |  (EntityEditPanel)     | panel | } editControlPanel
       |________________________|_______|
      
       With (BorderLayout.SOUTH):
       __________________________
       |         edit           |
       |        panel           |
       |________________________| } editControlPanel
       |     control panel      |
       |________________________|
      
       etc.
       
      Parameters:
      controlComponentConstraints - the controls component layout constraints (BorderLayout constraints)
      Returns:
      this Settings instance
      Throws:
      IllegalStateException - if the panel has been initialized
      IllegalArgumentException - in case the given constraint is not one of BorderLayout.SOUTH, NORTH, EAST or WEST
    • includeToggleEditPanelControl

      public EntityPanel.Settings includeToggleEditPanelControl(boolean includeToggleEditPanelControl)
      Parameters:
      includeToggleEditPanelControl - true if a control for toggling the edit panel should be included
      Returns:
      this Settings instance
      Throws:
      IllegalStateException - if the panel has been initialized
    • includeControls

      public EntityPanel.Settings includeControls(boolean includeControls)
      Parameters:
      includeControls - true if the edit an table panel controls should be included
      Returns:
      this Settings instance
      Throws:
      IllegalStateException - if the panel has been initialized
    • useKeyboardNavigation

      public EntityPanel.Settings useKeyboardNavigation(boolean useKeyboardNavigation)
      Parameters:
      useKeyboardNavigation - true if keyboard navigation should be enabled
      Returns:
      this Settings instance
      Throws:
      IllegalStateException - if the panel has been initialized
    • keyStroke

      public Value<KeyStroke> keyStroke(EntityPanel.KeyboardShortcut shortcut)
      Parameters:
      shortcut - the keyboard shortcut key
      Returns:
      the Value controlling the keyStroke for the given keyboard shortcut key