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.AutoResizeModeSelection>
Specifies how column selection is presented to the user.static final PropertyValue<EntityTablePanel.ColumnSelection>
Specifies how column selection is presented to the user.static final PropertyValue<ConditionPanel.ConditionView>
Specifies the default initial table condition panel view Value type:ConditionPanel.ConditionView
Default value:ConditionPanel.ConditionView.HIDDEN
static final PropertyValue<EntityTablePanel.EditAttributeSelection>
Specifies how the edit an attribute action is presented to the user.static final PropertyValue<ConditionPanel.ConditionView>
Specifies the default initial table filter panel view Value type:ConditionPanel.ConditionView
Default value:ConditionPanel.ConditionView.HIDDEN
static final PropertyValue<Boolean>
Specifies whether to include a 'Clear' control in the popup menu.static final PropertyValue<Boolean>
Specifies whether to include a condition panel.static final PropertyValue<Boolean>
Specifies whether to include aEntityPopupMenu
on this table, triggered with CTRL-ALT-V.static final PropertyValue<Boolean>
Specifies whether to include a filter panel.static final PropertyValue<Boolean>
Specifies whether to include a popup menu for configuring the table model limit.static 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.static final PropertyValue<Boolean>
Specifies whether the table model sort order is used as a basis for the query order by clause.static final PropertyValue<Boolean>
Specifies whether the values of hidden columns are included in the underlying query Value type: Boolean Default value: truestatic 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.static 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 TypeMethodDescriptionautoResizeModeSelection
(EntityTablePanel.AutoResizeModeSelection autoResizeModeSelection) <T,
A extends Attribute<T>>
EntityTablePanel.ConfigcellEditor
(A attribute, FilterTableCellEditor<T> cellEditor) Sets the cell editor for the given attributecellEditorFactory
(FilterTableCellEditor.Factory<Attribute<?>> cellEditorFactory) Overridden bycellEditor(Attribute, FilterTableCellEditor)
.<T,
A extends Attribute<T>>
EntityTablePanel.ConfigcellRenderer
(A attribute, FilterTableCellRenderer<T> cellRenderer) Sets the cell renderer for the given attributecellRendererFactory
(EntityTableCellRenderer.Factory cellRendererFactory) Overridden bycellRenderer(Attribute, FilterTableCellRenderer)
.columnSelection
(EntityTablePanel.ColumnSelection columnSelection) conditionFieldFactory
(Attribute<?> attribute, ColumnConditionPanel.FieldFactory conditionFieldFactory) conditionPanelFactory
(TableConditionPanel.Factory<Attribute<?>> conditionPanelFactory) conditionView
(ConditionPanel.ConditionView conditionView) deleteConfirmer
(EntityEditPanel.Confirmer deleteConfirmer) editAttributeSelection
(EntityTablePanel.EditAttributeSelection editAttributeSelection) <T,
A extends Attribute<T>, C extends JComponent>
EntityTablePanel.ConfigeditComponentFactory
(A attribute, EntityComponentFactory<T, C> componentFactory) Sets the component factory for the given attribute, used when editing entities viaEntityTablePanel.editSelected(Attribute)
.filterView
(ConditionPanel.ConditionView filterView) includeAddControl
(boolean includeAddControl) includeClearControl
(boolean includeClearControl) includeConditions
(boolean includeConditions) includeEditAttributeControl
(boolean includeEditAttributeControl) includeEditControl
(boolean includeEditControl) includeEntityMenu
(boolean includeEntityMenu) includeFilters
(boolean includeFilters) includeLimitMenu
(boolean includeLimitMenu) includePopupMenu
(boolean includePopupMenu) includeSelectionModeControl
(boolean includeSelectionModeControl) includeSouthPanel
(boolean includeSouthPanel) includeSummaries
(boolean includeSummaries) includeToolBar
(boolean includeToolBar) keyStroke
(ControlKey<?> controlKey, Consumer<Value<KeyStroke>> keyStroke) referentialIntegrityErrorHandling
(ReferentialIntegrityErrorHandling referentialIntegrityErrorHandling) refreshButtonVisible
(EntityTablePanel.RefreshButtonVisible refreshButtonVisible) showRefreshProgressBar
(boolean showRefreshProgressBar) statusMessage
(Function<SwingEntityTableModel, String> statusMessage) table
(Consumer<FilterTable.Builder<Entity, Attribute<?>>> builder) Provides access to the builder for the underlyingFilterTable
<T extends EntityTablePanel>
T
-
Field Details
-
QUERY_HIDDEN_COLUMNS
Specifies whether the values of hidden columns are included in the underlying query- Value type: Boolean
- Default value: true
-
ORDER_QUERY_BY_SORT_ORDER
Specifies whether the table model sort order is used as a basis for the query order by clause. Note that this only applies to column attributes.- Value type: Boolean
- Default value: false
-
CONDITION_VIEW
Specifies the default initial table condition panel view- Value type:
ConditionPanel.ConditionView
- Default value:
ConditionPanel.ConditionView.HIDDEN
- Value type:
-
FILTER_VIEW
Specifies the default initial table filter panel view- Value type:
ConditionPanel.ConditionView
- Default value:
ConditionPanel.ConditionView.HIDDEN
- Value type:
-
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_CONDITIONS
Specifies whether to include a condition panel.- Value type: Boolean
- Default value: true
-
INCLUDE_FILTERS
Specifies whether to include a filter panel.- Value type: Boolean
- Default value: true
-
INCLUDE_SUMMARY
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
- Value type:
-
AUTO_RESIZE_MODE_SELECTION
public static final PropertyValue<EntityTablePanel.AutoResizeModeSelection> AUTO_RESIZE_MODE_SELECTIONSpecifies how column selection is presented to the user.- Value type:
EntityTablePanel.AutoResizeModeSelection
- Default value:
EntityTablePanel.AutoResizeModeSelection.DIALOG
- Value type:
-
EDIT_ATTRIBUTE_SELECTION
Specifies how the edit an attribute action is presented to the user.- Value type:
EntityTablePanel.EditAttributeSelection
- Default value:
EntityTablePanel.EditAttributeSelection.MENU
- Value type:
-
-
Method Details
-
tablePanel
- Type Parameters:
T
- the table panel type- Returns:
- the table panel
-
table
Provides access to the builder for the underlyingFilterTable
- Parameters:
builder
- the table builder- Returns:
- this Config instance
-
conditionPanelFactory
public EntityTablePanel.Config conditionPanelFactory(TableConditionPanel.Factory<Attribute<?>> conditionPanelFactory) - Parameters:
conditionPanelFactory
- the table condition panel factory- Returns:
- this Config instance
-
conditionFieldFactory
public EntityTablePanel.Config conditionFieldFactory(Attribute<?> attribute, ColumnConditionPanel.FieldFactory conditionFieldFactory) - Parameters:
attribute
- the attributeconditionFieldFactory
- the condition field factory for the given attribute- Returns:
- this Config instance
- See Also:
-
includeSouthPanel
- Parameters:
includeSouthPanel
- true if the south panel should be included- Returns:
- this Config instance
-
includeConditions
- Parameters:
includeConditions
- true if the condition panel should be included- Returns:
- this Config instance
-
conditionView
- Parameters:
conditionView
- the initial condition view- Returns:
- this Config instance
-
includeFilters
- Parameters:
includeFilters
- true if the filter panel should be included- Returns:
- this Config instance
-
filterView
- Parameters:
filterView
- the initial filter view- Returns:
- this Config instance
-
includeSummaries
- Parameters:
includeSummaries
- 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
-
autoResizeModeSelection
public EntityTablePanel.Config autoResizeModeSelection(EntityTablePanel.AutoResizeModeSelection autoResizeModeSelection) - Parameters:
autoResizeModeSelection
- specifies how auto-resize-mode is selected- Returns:
- this Config instance
-
editAttributeSelection
public EntityTablePanel.Config editAttributeSelection(EntityTablePanel.EditAttributeSelection editAttributeSelection) - Parameters:
editAttributeSelection
- specifies how attribute selection is presented selected when editing the selected records- Returns:
- this Config instance
-
keyStroke
public EntityTablePanel.Config keyStroke(ControlKey<?> controlKey, Consumer<Value<KeyStroke>> keyStroke) - Parameters:
controlKey
- the control keykeyStroke
- provides access to theValue
controlling the key stroke for the given control- 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, 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
-
cellEditor
public <T,A extends Attribute<T>> EntityTablePanel.Config cellEditor(A attribute, FilterTableCellEditor<T> cellEditor) Sets the cell editor for the given attribute- Type Parameters:
T
- the value typeA
- the attribute type- Parameters:
attribute
- the attributecellEditor
- the cell editor- Returns:
- this Config instance
- See Also:
-
cellEditorFactory
public EntityTablePanel.Config cellEditorFactory(FilterTableCellEditor.Factory<Attribute<?>> cellEditorFactory) Overridden bycellEditor(Attribute, FilterTableCellEditor)
.- Parameters:
cellEditorFactory
- the cell editor factory- Returns:
- this Config instance
- See Also:
-
cellRenderer
public <T,A extends Attribute<T>> EntityTablePanel.Config cellRenderer(A attribute, FilterTableCellRenderer<T> cellRenderer) Sets the cell renderer for the given attribute- Type Parameters:
T
- the value typeA
- the attribute type- Parameters:
attribute
- the attributecellRenderer
- the cell renderer- Returns:
- this Config instance
- See Also:
-
cellRendererFactory
public EntityTablePanel.Config cellRendererFactory(EntityTableCellRenderer.Factory cellRendererFactory) Overridden bycellRenderer(Attribute, FilterTableCellRenderer)
.- Parameters:
cellRendererFactory
- the cell renderer factory- Returns:
- this Config instance
- See Also:
-
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:
-