Class EntityTablePanel.Config

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

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

    • CONDITION_PANEL_VISIBLE

      public static final PropertyValue<Boolean> CONDITION_PANEL_VISIBLE
      Specifies whether table condition panels should be visible or not by default
      Value type: Boolean
      Default value: false
    • FILTER_PANEL_VISIBLE

      public static final PropertyValue<Boolean> FILTER_PANEL_VISIBLE
      Specifies whether table filter panels should be visible or not by default
      Value type: Boolean
      Default value: false
    • SUMMARY_PANEL_VISIBLE

      public static final PropertyValue<Boolean> SUMMARY_PANEL_VISIBLE
      Specifies whether table summary panel should be visible or not by default
      Value type: Boolean
      Default value: false
    • INCLUDE_POPUP_MENU

      public static final PropertyValue<Boolean> INCLUDE_POPUP_MENU
      Specifies whether to include the default popup menu on entity tables
      Value type: Boolean
      Default value: true
    • INCLUDE_ENTITY_MENU

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

      public static final PropertyValue<Boolean> INCLUDE_CLEAR_CONTROL
      Specifies whether to include a 'Clear' control in the popup menu.
      Value type: Boolean
      Default value: false
    • INCLUDE_CONDITION_PANEL

      public static final PropertyValue<Boolean> INCLUDE_CONDITION_PANEL
      Specifies whether to include a condition panel.
      Value type: Boolean
      Default value: true
    • INCLUDE_FILTER_PANEL

      public static final PropertyValue<Boolean> INCLUDE_FILTER_PANEL
      Specifies whether to include a filter panel.
      Value type: Boolean
      Default value: true
    • INCLUDE_SUMMARY_PANEL

      public static final PropertyValue<Boolean> INCLUDE_SUMMARY_PANEL
      Specifies whether to include a summary panel.
      Value type: Boolean
      Default value: true
    • INCLUDE_LIMIT_MENU

      public static final PropertyValue<Boolean> INCLUDE_LIMIT_MENU
      Specifies whether to include a popup menu for configuring the table model limit.
      Value type: Boolean
      Default value: false
    • SHOW_REFRESH_PROGRESS_BAR

      public static final PropertyValue<Boolean> SHOW_REFRESH_PROGRESS_BAR
      Specifies whether to show an indeterminate progress bar while the model is refreshing.
      Value type: Boolean
      Default value: false
    • REFRESH_BUTTON_VISIBLE

      public static final PropertyValue<EntityTablePanel.RefreshButtonVisible> REFRESH_BUTTON_VISIBLE
      Specifies whether the refresh button should always be visible or only when the condition panel is visible
      Value type: Boolean
      Default value: EntityTablePanel.RefreshButtonVisible.WHEN_CONDITION_PANEL_IS_VISIBLE
    • COLUMN_SELECTION

      public static final PropertyValue<EntityTablePanel.ColumnSelection> COLUMN_SELECTION
      Specifies how column selection is presented to the user.
      Value type: EntityTablePanel.ColumnSelection
      Default value: EntityTablePanel.ColumnSelection.DIALOG
    • KEYBOARD_SHORTCUTS

      public static final KeyboardShortcuts<EntityTablePanel.KeyboardShortcut> KEYBOARD_SHORTCUTS
      The default keyboard shortcut keyStrokes.
  • Method Details

    • conditionPanelFactory

      public EntityTablePanel.Config conditionPanelFactory(EntityConditionPanelFactory conditionPanelFactory)
      Parameters:
      conditionPanelFactory - the condition panel factory
      Returns:
      this Config instance
    • includeSouthPanel

      public EntityTablePanel.Config includeSouthPanel(boolean includeSouthPanel)
      Parameters:
      includeSouthPanel - true if the south panel should be included
      Returns:
      this Config instance
    • includeConditionPanel

      public EntityTablePanel.Config includeConditionPanel(boolean includeConditionPanel)
      Parameters:
      includeConditionPanel - true if the condition panel should be included
      Returns:
      this Config instance
    • includeFilterPanel

      public EntityTablePanel.Config includeFilterPanel(boolean includeFilterPanel)
      Parameters:
      includeFilterPanel - true if the filter panel should be included
      Returns:
      this Config instance
    • includeSummaryPanel

      public EntityTablePanel.Config includeSummaryPanel(boolean includeSummaryPanel)
      Parameters:
      includeSummaryPanel - true if the summary panel should be included
      Returns:
      this Config instance
    • includePopupMenu

      public EntityTablePanel.Config includePopupMenu(boolean includePopupMenu)
      Parameters:
      includePopupMenu - true if a popup menu should be included
      Returns:
      this Config instance
    • includeClearControl

      public EntityTablePanel.Config includeClearControl(boolean includeClearControl)
      Parameters:
      includeClearControl - true if a 'Clear' control should be included in the popup menu
      Returns:
      this Config instance
      Throws:
      IllegalStateException - in case the panel has already been initialized
    • includeLimitMenu

      public EntityTablePanel.Config includeLimitMenu(boolean includeLimitMenu)
      Parameters:
      includeLimitMenu - true if a popup menu for configuring the table model limit should be included
      Returns:
      this Config instance
    • includeEntityMenu

      public EntityTablePanel.Config includeEntityMenu(boolean includeEntityMenu)
      Parameters:
      includeEntityMenu - true a EntityPopupMenu should be available in this table, triggered with CTRL-ALT-V.
      Returns:
      this Config instance
    • includeSelectionModeControl

      public EntityTablePanel.Config includeSelectionModeControl(boolean includeSelectionModeControl)
      Parameters:
      includeSelectionModeControl - true if a 'Single Selection' control should be included in the popup menu
      Returns:
      this Config instance
    • includeAddControl

      public EntityTablePanel.Config includeAddControl(boolean includeAddControl)
      Parameters:
      includeAddControl - true a Add control should be included if a edit panel is available
      Returns:
      this Config instance
    • includeEditControl

      public EntityTablePanel.Config includeEditControl(boolean includeEditControl)
      Parameters:
      includeEditControl - true a Edit control should be included if a edit panel is available
      Returns:
      this Config instance
    • columnSelection

      public EntityTablePanel.Config columnSelection(EntityTablePanel.ColumnSelection columnSelection)
      Parameters:
      columnSelection - specifies how columns are selected
      Returns:
      this Config instance
    • keyStrokes

      Parameters:
      shortcuts - provides this tables KeyboardShortcuts instance.
      Returns:
      this Config instance
    • editable

      public EntityTablePanel.Config editable(Consumer<ValueSet<Attribute<?>>> attributes)
      Parameters:
      attributes - provides this tables editable attribute value set
      Returns:
      this Config instance
    • deleteConfirmer

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

      public <T, A extends Attribute<T>, C extends JComponent> EntityTablePanel.Config editComponentFactory(A attribute, EntityComponentFactory<T,A,C> componentFactory)
      Sets the component factory for the given attribute, used when editing entities via EntityTablePanel.editSelected(Attribute).
      Type Parameters:
      T - the value type
      A - the attribute type
      C - the component type
      Parameters:
      attribute - the attribute
      componentFactory - the component factory
      Returns:
      this Config instance
    • tableCellEditorFactory

      public <T, A extends Attribute<T>, C extends JComponent> EntityTablePanel.Config tableCellEditorFactory(A attribute, EntityComponentFactory<T,A,C> componentFactory)
      Sets the table cell editor component factory for the given attribute.
      Type Parameters:
      T - the value type
      A - the attribute type
      C - the component type
      Parameters:
      attribute - the attribute
      componentFactory - the component factory
      Returns:
      this Config instance
    • referentialIntegrityErrorHandling

      public EntityTablePanel.Config referentialIntegrityErrorHandling(ReferentialIntegrityErrorHandling referentialIntegrityErrorHandling)
      Parameters:
      referentialIntegrityErrorHandling - the action to take on a referential integrity error on delete
      Returns:
      this Config instance
    • refreshButtonVisible

      public EntityTablePanel.Config refreshButtonVisible(EntityTablePanel.RefreshButtonVisible refreshButtonVisible)
      Parameters:
      refreshButtonVisible - the refresh button visible setting
      Returns:
      this Config instance
    • statusMessage

      public EntityTablePanel.Config statusMessage(Function<SwingEntityTableModel,String> statusMessage)
      Parameters:
      statusMessage - the function used for creating the table status message
      Returns:
      this Config instance
    • showRefreshProgressBar

      public EntityTablePanel.Config showRefreshProgressBar(boolean showRefreshProgressBar)
      Parameters:
      showRefreshProgressBar - controls whether an indeterminate progress bar should be shown while the model is refreshing
      Returns:
      this Config instance
      See Also: