Module is.codion.swing.framework.ui
Package is.codion.swing.framework.ui
Class EntityTablePanel.Config
java.lang.Object
is.codion.swing.framework.ui.EntityTablePanel.Config
- Enclosing class:
- EntityTablePanel
Contains configuration settings for a
EntityTablePanel
which must be set before the panel is initialized.-
Field Summary
Modifier and TypeFieldDescriptionstatic final PropertyValue<EntityTablePanel.ColumnSelection>
Specifies how column selection is presented to the user.
Value type:EntityTablePanel.ColumnSelection
Default value:EntityTablePanel.ColumnSelection.DIALOG
static final PropertyValue<Boolean>
Specifies whether table condition panels should be visible or not by default
Value type: Boolean
Default value: falsestatic final PropertyValue<EntityTablePanel.EditAttributeSelection>
Specifies how the edit an attribute action is presented to the user.
Value type:EntityTablePanel.EditAttributeSelection
Default value:EntityTablePanel.EditAttributeSelection.MENU
static final PropertyValue<Boolean>
Specifies whether table filter panels should be visible or not by default
Value type: Boolean
Default value: falsestatic final PropertyValue<Boolean>
Specifies whether to include a 'Clear' control in the popup menu.
Value type: Boolean
Default value: falsestatic final PropertyValue<Boolean>
Specifies whether to include a condition panel.
Value type: Boolean
Default value: truestatic final PropertyValue<Boolean>
Specifies whether to include aEntityPopupMenu
on this table, triggered with CTRL-ALT-V.
Value type: Boolean
Default value: truestatic final PropertyValue<Boolean>
Specifies whether to include a filter panel.
Value type: Boolean
Default value: truestatic final PropertyValue<Boolean>
Specifies whether to include a popup menu for configuring the table model limit.
Value type: Boolean
Default value: falsestatic final PropertyValue<Boolean>
Specifies whether to include the default popup menu on entity tables
Value type: Boolean
Default value: truestatic final PropertyValue<Boolean>
Specifies whether to include a summary panel.
Value type: Boolean
Default value: truestatic final KeyboardShortcuts<EntityTablePanel.KeyboardShortcut>
The default keyboard shortcut keyStrokes.static final PropertyValue<EntityTablePanel.RefreshButtonVisible>
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
static final PropertyValue<Boolean>
Specifies whether to show an indeterminate progress bar while the model is refreshing.
Value type: Boolean
Default value: falsestatic final PropertyValue<Boolean>
Specifies whether table summary panel should be visible or not by default
Value type: Boolean
Default value: false -
Method Summary
Modifier and TypeMethodDescriptioncolumnSelection
(EntityTablePanel.ColumnSelection columnSelection) conditionPanelFactory
(EntityConditionPanelFactory conditionPanelFactory) deleteConfirmer
(EntityEditPanel.Confirmer deleteConfirmer) editAttributeSelection
(EntityTablePanel.EditAttributeSelection editAttributeSelection) <T,
A extends Attribute<T>, C extends JComponent>
EntityTablePanel.ConfigeditComponentFactory
(A attribute, EntityComponentFactory<T, A, C> componentFactory) Sets the component factory for the given attribute, used when editing entities viaEntityTablePanel.editSelected(Attribute)
.includeAddControl
(boolean includeAddControl) includeClearControl
(boolean includeClearControl) includeConditionPanel
(boolean includeConditionPanel) includeEditAttributeControl
(boolean includeEditAttributeControl) includeEditControl
(boolean includeEditControl) includeEntityMenu
(boolean includeEntityMenu) includeFilterPanel
(boolean includeFilterPanel) includeLimitMenu
(boolean includeLimitMenu) includePopupMenu
(boolean includePopupMenu) includeSelectionModeControl
(boolean includeSelectionModeControl) includeSouthPanel
(boolean includeSouthPanel) includeSummaryPanel
(boolean includeSummaryPanel) includeToolBar
(boolean includeToolBar) referentialIntegrityErrorHandling
(ReferentialIntegrityErrorHandling referentialIntegrityErrorHandling) refreshButtonVisible
(EntityTablePanel.RefreshButtonVisible refreshButtonVisible) showRefreshProgressBar
(boolean showRefreshProgressBar) statusMessage
(Function<SwingEntityTableModel, String> statusMessage) <T,
A extends Attribute<T>, C extends JComponent>
EntityTablePanel.ConfigtableCellEditorFactory
(A attribute, EntityComponentFactory<T, A, C> componentFactory) Sets the table cell editor component factory for the given attribute.
-
Field Details
-
CONDITION_PANEL_VISIBLE
Specifies whether table condition panels should be visible or not by default
Value type: Boolean
Default value: false -
FILTER_PANEL_VISIBLE
Specifies whether table filter panels should be visible or not by default
Value type: Boolean
Default value: false -
SUMMARY_PANEL_VISIBLE
Specifies whether table summary panel should be visible or not by default
Value type: Boolean
Default value: false -
INCLUDE_POPUP_MENU
Specifies whether to include the default popup menu on entity tables
Value type: Boolean
Default value: true -
INCLUDE_ENTITY_MENU
Specifies whether to include aEntityPopupMenu
on this table, triggered with CTRL-ALT-V.
Value type: Boolean
Default value: true -
INCLUDE_CLEAR_CONTROL
Specifies whether to include a 'Clear' control in the popup menu.
Value type: Boolean
Default value: false -
INCLUDE_CONDITION_PANEL
Specifies whether to include a condition panel.
Value type: Boolean
Default value: true -
INCLUDE_FILTER_PANEL
Specifies whether to include a filter panel.
Value type: Boolean
Default value: true -
INCLUDE_SUMMARY_PANEL
Specifies whether to include a summary panel.
Value type: Boolean
Default value: true -
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
Specifies whether to show an indeterminate progress bar while the model is refreshing.
Value type: Boolean
Default value: false -
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
Specifies how column selection is presented to the user.
Value type:EntityTablePanel.ColumnSelection
Default value:EntityTablePanel.ColumnSelection.DIALOG
-
EDIT_ATTRIBUTE_SELECTION
Specifies how the edit an attribute action is presented to the user.
Value type:EntityTablePanel.EditAttributeSelection
Default value:EntityTablePanel.EditAttributeSelection.MENU
-
KEYBOARD_SHORTCUTS
The default keyboard shortcut keyStrokes.
-
-
Method Details
-
tablePanel
- Returns:
- the table panel
-
conditionPanelFactory
public EntityTablePanel.Config conditionPanelFactory(EntityConditionPanelFactory conditionPanelFactory) - Parameters:
conditionPanelFactory
- the condition panel factory- Returns:
- this Config instance
-
includeSouthPanel
- Parameters:
includeSouthPanel
- true if the south panel should be included- Returns:
- this Config instance
-
includeConditionPanel
- Parameters:
includeConditionPanel
- true if the condition panel should be included- Returns:
- this Config instance
-
includeFilterPanel
- Parameters:
includeFilterPanel
- true if the filter panel should be included- Returns:
- this Config instance
-
includeSummaryPanel
- Parameters:
includeSummaryPanel
- true if the summary panel should be included- Returns:
- this Config instance
-
includePopupMenu
- Parameters:
includePopupMenu
- true if a popup menu should be included- Returns:
- this Config instance
-
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
- Parameters:
includeLimitMenu
- true if a popup menu for configuring the table model limit should be included- Returns:
- this Config instance
-
includeEntityMenu
- Parameters:
includeEntityMenu
- true if aEntityPopupMenu
should be available in this table, triggered with CTRL-ALT-V.- Returns:
- this Config instance
-
includeSelectionModeControl
- Parameters:
includeSelectionModeControl
- true if a 'Single Selection' control should be included in the popup menu- Returns:
- this Config instance
-
includeToolBar
- Parameters:
includeToolBar
- true if a toolbar should be included on the south panel- Returns:
- this Config instance
-
includeAddControl
- Parameters:
includeAddControl
- true if a Add control should be included if a edit panel is available- Returns:
- this Config instance
-
includeEditControl
- Parameters:
includeEditControl
- true if a Edit control should be included if a edit panel is available- Returns:
- this Config instance
-
includeEditAttributeControl
- Parameters:
includeEditAttributeControl
- true if a 'Edit' attribute control should be included- Returns:
- this Config instance
- See Also:
-
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<KeyboardShortcuts<EntityTablePanel.KeyboardShortcut>> shortcuts) - Parameters:
shortcuts
- provides this tablesKeyboardShortcuts
instance.- Returns:
- this Config instance
-
editable
- Parameters:
attributes
- provides this tables editable attribute value set- Returns:
- this Config instance
-
deleteConfirmer
- Parameters:
deleteConfirmer
- the delete confirmer- Returns:
- this Config instance
-
editComponentFactory
public <T,A extends Attribute<T>, EntityTablePanel.Config editComponentFactoryC extends JComponent> (A attribute, EntityComponentFactory<T, A, C> componentFactory) Sets the component factory for the given attribute, used when editing entities viaEntityTablePanel.editSelected(Attribute)
.- Type Parameters:
T
- the value typeA
- the attribute typeC
- the component type- Parameters:
attribute
- the attributecomponentFactory
- the component factory- Returns:
- this Config instance
-
tableCellEditorFactory
public <T,A extends Attribute<T>, EntityTablePanel.Config tableCellEditorFactoryC extends JComponent> (A attribute, EntityComponentFactory<T, A, C> componentFactory) Sets the table cell editor component factory for the given attribute.- Type Parameters:
T
- the value typeA
- the attribute typeC
- the component type- Parameters:
attribute
- the attributecomponentFactory
- 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
- Parameters:
statusMessage
- the function used for creating the table status message- Returns:
- this Config instance
-
showRefreshProgressBar
- Parameters:
showRefreshProgressBar
- controls whether an indeterminate progress bar should be shown while the model is refreshing- Returns:
- this Config instance
- See Also:
-