Module is.codion.swing.framework.ui
Package is.codion.swing.framework.ui
Class EntityEditPanel.Config
java.lang.Object
is.codion.swing.framework.ui.EntityEditPanel.Config
- Enclosing class:
EntityEditPanel
Contains configuration settings for a
EntityEditPanel which must be set before the panel is initialized.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyValue<Boolean> Specifies whether to include aEntityPopupMenuon this edit panel, triggered with CTRL-ALT-V by default.static final PropertyValue<Boolean> Specifies whether to include a Query Inspector on this edit panel, triggered with CTRL-ALT-Q.static final PropertyValue<Boolean> Indicates whether the panel should ask for confirmation before discarding unsaved modifications Value type: Boolean Default value: falsestatic final PropertyValue<Boolean> Specifies whether edit panels should be activated when the panel (or its parent EntityPanel) receives focus Value type: Boolean Default value: truestatic final PropertyValue<Boolean> Specifies whether the add/insert button caption should be 'Save' (mnemonic S), instead of 'Add' (mnemonic A) Value type: Boolean Default value: false -
Method Summary
Modifier and TypeMethodDescriptionclearAfterInsert(boolean clearAfterInsert) deleteConfirmer(EntityEditPanel.Confirmer deleteConfirmer) excludeFromSelection(Collection<Attribute<?>> excludeFromSelection) Specifies the attributes that should be excluded when presenting a component selection list.focusActivation(boolean focusActivation) includeEntityMenu(boolean includeEntityMenu) includeQueryInspector(boolean includeQueryInspector) insertConfirmer(EntityEditPanel.Confirmer insertConfirmer) keyStroke(ControlKey<?> controlKey, Consumer<Value<KeyStroke>> keyStroke) modifiedIndicator(boolean modifiedIndicator) modifiedWarning(boolean modifiedWarning) referentialIntegrityErrorHandling(ReferentialIntegrityErrorHandling referentialIntegrityErrorHandling) requestFocusAfterInsert(boolean requestFocusAfterInsert) updateConfirmer(EntityEditPanel.Confirmer updateConfirmer) validIndicator(boolean validIndicator)
-
Field Details
-
USE_SAVE_CAPTION
Specifies whether the add/insert button caption should be 'Save' (mnemonic S), instead of 'Add' (mnemonic A)- Value type: Boolean
- Default value: false
-
INCLUDE_ENTITY_MENU
Specifies whether to include aEntityPopupMenuon this edit panel, triggered with CTRL-ALT-V by default.- Value type: Boolean
- Default value: true
-
INCLUDE_QUERY_INSPECTOR
Specifies whether to include a Query Inspector on this edit panel, triggered with CTRL-ALT-Q.- Value type: Boolean
- Default value: false
-
USE_FOCUS_ACTIVATION
Specifies whether edit panels should be activated when the panel (or its parent EntityPanel) receives focus- Value type: Boolean
- Default value: true
-
MODIFIED_WARNING
Indicates whether the panel should ask for confirmation before discarding unsaved modifications- Value type: Boolean
- Default value: false
-
-
Method Details
-
editPanel
- Returns:
- the edit panel
-
keyStroke
public EntityEditPanel.Config keyStroke(ControlKey<?> controlKey, Consumer<Value<KeyStroke>> keyStroke) - Parameters:
controlKey- the control keykeyStroke- provides access to theValuecontrolling the keyStroke for the given control- Returns:
- this Config instance
-
clearAfterInsert
- Parameters:
clearAfterInsert- controls whether the UI should be cleared after insert has been performed- Returns:
- this Config instance
-
requestFocusAfterInsert
- Parameters:
requestFocusAfterInsert- controls whether the UI should request focus after insert has been performed- Returns:
- this Config instance
- See Also:
-
referentialIntegrityErrorHandling
public EntityEditPanel.Config referentialIntegrityErrorHandling(ReferentialIntegrityErrorHandling referentialIntegrityErrorHandling) - Parameters:
referentialIntegrityErrorHandling- controls which action to take on a referential integrity error on delete- Returns:
- this Config instance
-
focusActivation
- Parameters:
focusActivation- true if the edit panel should be activated when it or its parent EntityPanel receives focus- Returns:
- this Config instance
- See Also:
-
includeEntityMenu
- Parameters:
includeEntityMenu- true if an entity menu should be included- Returns:
- this Config instance
- See Also:
-
includeQueryInspector
- Parameters:
includeQueryInspector- true if a Query Inspector should be available in this edit panel, triggered with CTRL-ALT-Q.- Returns:
- this Config instance
-
modifiedWarning
- Parameters:
modifiedWarning- specifies whether this edit panel presents a warning before discarding unsaved modifications- Returns:
- this Config instance
- See Also:
-
validIndicator
- Parameters:
validIndicator- specifies whether components should indicate validity- Returns:
- this Config instance
- See Also:
-
modifiedIndicator
- Parameters:
modifiedIndicator- specifies whether components should indicate modification- Returns:
- this Config instance
- See Also:
-
insertConfirmer
- Parameters:
insertConfirmer- the insert confirmer- Returns:
- this Config instance
-
deleteConfirmer
- Parameters:
deleteConfirmer- the delete confirmer- Returns:
- this Config instance
-
updateConfirmer
- Parameters:
updateConfirmer- the update confirmer- Returns:
- this Config instance
-
excludeFromSelection
Specifies the attributes that should be excluded when presenting a component selection list.- Parameters:
excludeFromSelection- aCollectioncontaining the attributes to exclude from component selection- Returns:
- this Config instance
- Throws:
IllegalArgumentException- in case an attribute is not found in the underlying entity- See Also:
-