Module is.codion.swing.framework.ui
Package is.codion.swing.framework.ui
Interface EntityPanel.Builder
- Enclosing class:
- EntityPanel
public static interface EntityPanel.Builder
A builder for
EntityPanel
instances.-
Method Summary
Modifier and TypeMethodDescriptionbuild
(EntityConnectionProvider connectionProvider) Builds anEntityPanel
based on this builder configuration.build
(SwingEntityModel model) Builds anEntityPanel
based on this builder configurationcaption()
conditionView
(ConditionPanel.ConditionView conditionView) description
(String description) detailLayout
(Function<EntityPanel, EntityPanel.DetailLayout> detailLayout) detailPanel
(EntityPanel.Builder panelBuilder) Adds the given detail panel builder to this panel builder, if it hasn't been previously addededitPanel
(Class<? extends EntityEditPanel> editPanelClass) filterView
(ConditionPanel.ConditionView filterView) icon()
onBuildEditPanel
(Consumer<EntityEditPanel> onBuildEditPanel) onBuildPanel
(Consumer<EntityPanel> onBuildPanel) onBuildTablePanel
(Consumer<EntityTablePanel> onBuildTablePanel) panel
(Class<? extends EntityPanel> panelClass) Note that setting theEntityPanel
class overrides anyEntityTablePanel
orEntityEditPanel
classes that have been set.preferredSize
(Dimension preferredSize) refreshWhenInitialized
(boolean refreshWhenInitialized) Default true.tablePanel
(Class<? extends EntityTablePanel> tablePanelClass)
-
Method Details
-
entityType
EntityType entityType()- Returns:
- the entityType
-
description
- Parameters:
description
- the panel description- Returns:
- this builder instance
-
description
- Returns:
- the description, an empty Optional if none has been set
-
icon
- Parameters:
icon
- the panel icon- Returns:
- this builder instance
-
icon
- Returns:
- the icon, an empty Optional if none has been set
-
detailPanel
Adds the given detail panel builder to this panel builder, if it hasn't been previously added- Parameters:
panelBuilder
- the detail panel provider- Returns:
- this builder instance
-
refreshWhenInitialized
Default true.- Parameters:
refreshWhenInitialized
- if true then the table model this panel is based on will be refreshed when the panel is initialized- Returns:
- this builder instance
-
conditionView
- Parameters:
conditionView
- the initial condition panel view- Returns:
- this builder instance
-
filterView
- Parameters:
filterView
- the initial filter panel view- Returns:
- this builder instance
-
detailLayout
- Parameters:
detailLayout
- provides the detail panel layout to use- Returns:
- this builder instane
-
preferredSize
- Parameters:
preferredSize
- the preferred panel size- Returns:
- this builder instance
-
panel
Note that setting theEntityPanel
class overrides anyEntityTablePanel
orEntityEditPanel
classes that have been set.- Parameters:
panelClass
- theEntityPanel
class to use when creating the panel- Returns:
- this builder instance
- See Also:
-
editPanel
- Parameters:
editPanelClass
- theEntityEditPanel
class to use when creating the panel- Returns:
- this builder instance
-
tablePanel
- Parameters:
tablePanelClass
- theEntityTablePanel
class to use when creating the panel- Returns:
- this builder instance
-
onBuildPanel
- Parameters:
onBuildPanel
- called after theEntityPanel
has been built- Returns:
- this builder instance
-
onBuildEditPanel
- Parameters:
onBuildEditPanel
- called after theEntityEditPanel
has been built- Returns:
- this builder instance
-
onBuildTablePanel
- Parameters:
onBuildTablePanel
- called after theEntityTablePanel
has been built- Returns:
- this builder instance
-
build
Builds anEntityPanel
based on this builder configuration.- Parameters:
connectionProvider
- the connection provider- Returns:
- an
EntityPanel
based on this builder - Throws:
IllegalStateException
- in case noSwingEntityModel.Builder
has been set
-
build
Builds anEntityPanel
based on this builder configuration- Parameters:
model
- theSwingEntityModel
to base the panel on- Returns:
- an
EntityPanel
based on this builder
-