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

  • Method Details

    • tablePanel

      public EntityTablePanel tablePanel()
      Returns:
      the table panel
    • configureTable

      public EntityTablePanel.Config configureTable(Consumer<FilterTable.Builder<Entity,Attribute<?>>> tableBuilder)
      Provides access to the builder for the underlying FilterTable
      Parameters:
      tableBuilder - the table builder
      Returns:
      this Config instance
    • tableConditionPanelFactory

      public EntityTablePanel.Config tableConditionPanelFactory(TableConditionPanel.Factory<Attribute<?>> tableConditionPanelFactory)
      Parameters:
      tableConditionPanelFactory - the table condition panel factory
      Returns:
      this Config instance
    • conditionFieldFactory

      public EntityTablePanel.Config conditionFieldFactory(FilterColumnConditionPanel.FieldFactory<Attribute<?>> conditionFieldFactory)
      Parameters:
      conditionFieldFactory - the condition field factory
      Returns:
      this Config instance
      See Also:
    • 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 if 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
    • includeToolBar

      public EntityTablePanel.Config includeToolBar(boolean includeToolBar)
      Parameters:
      includeToolBar - true if a toolbar should be included on the south panel
      Returns:
      this Config instance
    • includeAddControl

      public EntityTablePanel.Config includeAddControl(boolean includeAddControl)
      Parameters:
      includeAddControl - true if 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 if a Edit control should be included if a edit panel is available
      Returns:
      this Config instance
    • includeEditAttributeControl

      public EntityTablePanel.Config includeEditAttributeControl(boolean includeEditAttributeControl)
      Parameters:
      includeEditAttributeControl - true if a 'Edit' attribute control should be included
      Returns:
      this Config instance
      See Also:
    • columnSelection

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

      public EntityTablePanel.Config editAttributeSelection(EntityTablePanel.EditAttributeSelection editAttributeSelection)
      Parameters:
      editAttributeSelection - specifies attributes are selected when editing the selected records
      Returns:
      this Config instance
    • keyStrokes

      public EntityTablePanel.Config keyStrokes(Consumer<ControlKeyStrokes> keyStrokes)
      Parameters:
      keyStrokes - provides this tables ControlKeyStrokes 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: