java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
is.codion.swing.framework.ui.EntityPanel
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Accessible
A panel representing an Entity via a EntityModel, which facilitates browsing and editing of records.
EntityType entityType = ...; EntityConnectionProvider connectionProvider = ...; SwingEntityModel entityModel = new SwingEntityModel(entityType, connectionProvider); EntityPanel entityPanel = new EntityPanel(entityModel); entityPanel.initialize(); JFrame frame = new JFrame(); frame.add(entityPanel); frame.pack(); frame.setVisible(true);
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA builder forEntityPanelinstances.static interfaceControls the detail panels of a entity panelstatic enumThe navigation and resizing directions.static enumThe keyboard shortcuts available forEntityPanels.static interfaceHandles the layout of a EntityPanelstatic enumThe possible states of a detail or edit panel.static interfaceSelects an entity panel.final classContains configuration settings for aEntityPanelwhich must be set before the panel is initialized.Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final is.codion.common.property.PropertyValue<String>Specifies where the control panel should be placed in a BorderLayout
Value type: Boolean
Default value:BorderLayout.EASTstatic final is.codion.common.property.PropertyValue<String>Specifies where the control toolbar should be placed in a BorderLayout
Value type: Boolean
Default value: BorderLayout.WESTstatic final is.codion.common.property.PropertyValue<Boolean>Indicates whether entity edit panel dialogs should be closed on escape
Value type: Boolean
Default value: truestatic final is.codion.common.property.PropertyValue<Boolean>Specifies whether entity panels should include controls by default
Value type: Boolean
Default value: truestatic final is.codion.common.property.PropertyValue<Boolean>Specifies whether a control for toggling the edit panel is available to the user
Value type: Boolean
Default value: truestatic final is.codion.swing.common.ui.key.KeyboardShortcuts<EntityPanel.KeyboardShortcut>The default keyboard shortcut keyStrokes.static final is.codion.common.property.PropertyValue<Boolean>Specifies whether the edit controls (Save, update, delete, clear, refresh) should be on a toolbar instead of a button panel
Value type: Boolean
Default value: falsestatic final is.codion.common.property.PropertyValue<Boolean>Specifies whether detail and edit panels should be displayed in a frame instead of the default dialog
Value type: Boolean
Default value: falsestatic final is.codion.common.property.PropertyValue<Boolean>Indicates whether keyboard navigation will be enabled
Value type: Boolean
Default value: trueFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionEntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel) Instantiates a new EntityPanel instance.EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityEditPanel editPanel) Instantiates a new EntityPanel instance.EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityEditPanel editPanel, EntityPanel.PanelLayout panelLayout) Instantiates a new EntityPanel instance.EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityEditPanel editPanel, EntityTablePanel tablePanel) Instantiates a new EntityPanel instance.EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityEditPanel editPanel, EntityTablePanel tablePanel, EntityPanel.PanelLayout panelLayout) Instantiates a new EntityPanel instance.EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityPanel.PanelLayout panelLayout) Instantiates a new EntityPanel instance.EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityTablePanel tablePanel) Instantiates a new EntityPanel instance.EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityTablePanel tablePanel, EntityPanel.PanelLayout panelLayout) Instantiates a new EntityPanel instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidactivate()Activates this panel, by initializing it, bringing its parent window to front and requesting initial focus.final Collection<EntityPanel>final voidaddActivateListener(Consumer<EntityPanel> listener) final voidaddDetailPanel(EntityPanel detailPanel) Adds the given detail panel and sets this panel as the parent panel of the given detail panel.final voidaddDetailPanels(EntityPanel... detailPanels) static EntityPanel.Builderbuilder(is.codion.framework.domain.entity.EntityType entityType) Instantiates a new EntityPanel.Builderstatic EntityPanel.Builderbuilder(is.codion.swing.framework.model.SwingEntityModel model) Instantiates a new EntityPanel.Builderstatic EntityPanel.Builderbuilder(is.codion.swing.framework.model.SwingEntityModel.Builder modelBuilder) Instantiates a new EntityPanel.Builderfinal is.codion.common.value.Value<String>caption()Setting this caption Value to null reverts back to the default entity caption.final EntityPanel.SettingsProvides a way to configure settings before the panel is initialized.final booleancontainsDetailPanel(is.codion.framework.domain.entity.EntityType entityType) Returns true if this panel contains a detail panel for the givenentityTypefinal booleanfinal booleanprotected JComponentcreateControlComponent(is.codion.swing.common.ui.control.Controls controls) Creates the component to place next to the edit panel, containing the available controls, such as insert, update, delete, clear and refresh.protected is.codion.swing.common.ui.control.ControlsCreates theControlsinstance on which to base the controls component.protected JPanelcreateEditBasePanel(EntityEditPanel editPanel) Creates a base panel containing the given edit panel.protected final is.codion.swing.common.ui.control.Controlprotected final is.codion.swing.common.ui.control.Controlprotected final is.codion.swing.common.ui.control.Controlprotected final is.codion.swing.common.ui.control.Controlprotected final is.codion.swing.common.ui.control.Controlfinal <T extends EntityPanel.DetailController>
Tfinal <T extends EntityPanel>
TdetailPanel(is.codion.framework.domain.entity.EntityType entityType) Returns the detail panel for the givenentityType, if one is availablefinal Collection<EntityPanel>Returns all detail panels.final voiddisplayException(Throwable exception) Displays the exception in a dialog, with the dialog owner as the current focus owner or this panel if none is available.final is.codion.common.state.Statefinal JPanelReturns the panel containing the edit panel and the controls component.protected final JPanelReturns the base panel containing the edit and table panels (north, center).final <T extends is.codion.swing.framework.model.SwingEntityEditModel>
Tfinal <T extends EntityEditPanel>
Tfinal is.codion.common.value.Value<EntityPanel.PanelState>final Stringfinal <T extends EntityPanel>
TInitializes this EntityPanel, in case of some specific initialization code you can override theinitializeUI()method and add your code there.protected final voidInitializes the edit panel, if one is available.protected final voidInitializes the table panel, if one is available.protected voidInitializes this EntityPanels UI.final <T extends is.codion.swing.framework.model.SwingEntityModel>
Tmodel()final Optional<EntityPanel>final voidRequests focus for this panel.voidSaves any user preferences for all entity panels and associated elementsfinal voidsetDescription(String description) Sets the description text to use in f.ex.final voidsetFocusCycleRoot(boolean focusCycleRoot) protected final voidSets up the keyboard navigation actions.protected final voidfinal <T extends is.codion.swing.framework.model.SwingEntityTableModel>
Tfinal <T extends EntityTablePanel>
Tfinal StringtoString()voidupdateUI()Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUIMethods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
USE_KEYBOARD_NAVIGATION
Indicates whether keyboard navigation will be enabled
Value type: Boolean
Default value: true -
DISPOSE_EDIT_DIALOG_ON_ESCAPE
Indicates whether entity edit panel dialogs should be closed on escape
Value type: Boolean
Default value: true -
INCLUDE_TOGGLE_EDIT_PANEL_CONTROL
public static final is.codion.common.property.PropertyValue<Boolean> INCLUDE_TOGGLE_EDIT_PANEL_CONTROLSpecifies whether a control for toggling the edit panel is available to the user
Value type: Boolean
Default value: true -
TOOLBAR_CONTROLS
Specifies whether the edit controls (Save, update, delete, clear, refresh) should be on a toolbar instead of a button panel
Value type: Boolean
Default value: false -
USE_FRAME_PANEL_DISPLAY
Specifies whether detail and edit panels should be displayed in a frame instead of the default dialog
Value type: Boolean
Default value: false -
CONTROL_PANEL_CONSTRAINTS
Specifies where the control panel should be placed in a BorderLayout
Value type: Boolean
Default value:BorderLayout.EAST- See Also:
-
CONTROL_TOOLBAR_CONSTRAINTS
Specifies where the control toolbar should be placed in a BorderLayout
Value type: Boolean
Default value: BorderLayout.WEST- See Also:
-
INCLUDE_CONTROLS
Specifies whether entity panels should include controls by default
Value type: Boolean
Default value: true -
KEYBOARD_SHORTCUTS
public static final is.codion.swing.common.ui.key.KeyboardShortcuts<EntityPanel.KeyboardShortcut> KEYBOARD_SHORTCUTSThe default keyboard shortcut keyStrokes.
-
-
Constructor Details
-
EntityPanel
public EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel) Instantiates a new EntityPanel instance. The panel is not laid out and initialized untilinitialize()is called.- Parameters:
entityModel- the EntityModel
-
EntityPanel
public EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityPanel.PanelLayout panelLayout) Instantiates a new EntityPanel instance. The panel is not laid out and initialized untilinitialize()is called.- Parameters:
entityModel- the EntityModelpanelLayout- the detail panel layout
-
EntityPanel
public EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityEditPanel editPanel) Instantiates a new EntityPanel instance. The panel is not laid out and initialized untilinitialize()is called.- Parameters:
entityModel- the EntityModeleditPanel- the edit panel
-
EntityPanel
public EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityEditPanel editPanel, EntityPanel.PanelLayout panelLayout) Instantiates a new EntityPanel instance. The panel is not laid out and initialized untilinitialize()is called.- Parameters:
entityModel- the EntityModeleditPanel- the edit panelpanelLayout- the detail panel layout
-
EntityPanel
public EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityTablePanel tablePanel) Instantiates a new EntityPanel instance. The panel is not laid out and initialized untilinitialize()is called.- Parameters:
entityModel- the EntityModeltablePanel- the table panel
-
EntityPanel
public EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityTablePanel tablePanel, EntityPanel.PanelLayout panelLayout) Instantiates a new EntityPanel instance. The panel is not laid out and initialized untilinitialize()is called.- Parameters:
entityModel- the EntityModeltablePanel- the table panelpanelLayout- the detail panel layout
-
EntityPanel
public EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityEditPanel editPanel, EntityTablePanel tablePanel) Instantiates a new EntityPanel instance. The panel is not laid out and initialized untilinitialize()is called.- Parameters:
entityModel- the EntityModeleditPanel- the edit paneltablePanel- the table panel
-
EntityPanel
public EntityPanel(is.codion.swing.framework.model.SwingEntityModel entityModel, EntityEditPanel editPanel, EntityTablePanel tablePanel, EntityPanel.PanelLayout panelLayout) Instantiates a new EntityPanel instance. The panel is not laid out and initialized untilinitialize()is called.- Parameters:
entityModel- the EntityModeleditPanel- the edit paneltablePanel- the table panelpanelLayout- the detail panel layout
-
-
Method Details
-
updateUI
public void updateUI() -
model
public final <T extends is.codion.swing.framework.model.SwingEntityModel> T model()- Type Parameters:
T- the model type- Returns:
- the EntityModel
-
editModel
public final <T extends is.codion.swing.framework.model.SwingEntityEditModel> T editModel()- Type Parameters:
T- the edit model type- Returns:
- the EntityEditModel
-
tableModel
public final <T extends is.codion.swing.framework.model.SwingEntityTableModel> T tableModel()- Type Parameters:
T- the table model type- Returns:
- the EntityTableModel
- Throws:
IllegalStateException- in case no table model is available
-
parentPanel
- Returns:
- the parent panel or an empty Optional in case of a root panel
-
configure
Provides a way to configure settings before the panel is initialized.- Returns:
- the
EntityPanel.Settingsinstance - Throws:
IllegalStateException- in case the panel has already been initialized
-
detailController
- Type Parameters:
T- the detail panel controller type- Returns:
- the detail panel controller
-
addDetailPanels
- Parameters:
detailPanels- the detail panels
-
addDetailPanel
Adds the given detail panel and sets this panel as the parent panel of the given detail panel.- Parameters:
detailPanel- the detail panel to add- Throws:
IllegalStateException- if the panel has been initialized or if it already contains the given detail panel
-
initialize
Initializes this EntityPanel, in case of some specific initialization code you can override theinitializeUI()method and add your code there. Calling this method a second time has no effect.- Type Parameters:
T- the entity panel type- Returns:
- this EntityPanel instance
-
editPanel
- Type Parameters:
T- the edit panel type- Returns:
- the edit panel
- Throws:
IllegalStateException- in case no edit panel is avilable- See Also:
-
containsEditPanel
public final boolean containsEditPanel()- Returns:
- true if this panel contains a edit panel.
-
tablePanel
- Type Parameters:
T- the table panel type- Returns:
- the table panel
- Throws:
IllegalStateException- in case no table panel is avilable- See Also:
-
containsTablePanel
public final boolean containsTablePanel()- Returns:
- true if this panel contains a table panel.
-
editControlPanel
Returns the panel containing the edit panel and the controls component.- Returns:
- the edit control panel
-
activeDetailPanels
- Returns:
- the currently visible/active detail EntityPanels, if any
-
detailPanel
public final <T extends EntityPanel> T detailPanel(is.codion.framework.domain.entity.EntityType entityType) Returns the detail panel for the givenentityType, if one is available- Type Parameters:
T- the entity panel type- Parameters:
entityType- the entityType of the detail panel to retrieve- Returns:
- the detail panel of the given type
- Throws:
IllegalArgumentException- in case the panel was not found
-
detailPanels
Returns all detail panels.- Returns:
- the detail panels
-
containsDetailPanel
public final boolean containsDetailPanel(is.codion.framework.domain.entity.EntityType entityType) Returns true if this panel contains a detail panel for the givenentityType- Parameters:
entityType- the entityType- Returns:
- true if a detail panel for the given entityType is found
-
toString
-
caption
Setting this caption Value to null reverts back to the default entity caption.- Returns:
- a Value for the caption used when presenting this entity panel
-
setDescription
Sets the description text to use in f.ex. tool tips for tabbed panes- Parameters:
description- the description
-
getDescription
- Returns:
- the description
-
addActivateListener
- Parameters:
listener- notified before this panel is activated- See Also:
-
activate
public final void activate()Activates this panel, by initializing it, bringing its parent window to front and requesting initial focus. It is up the panel or application layout to make sure this panel is made visible when activated.- See Also:
-
displayException
Displays the exception in a dialog, with the dialog owner as the current focus owner or this panel if none is available.- Parameters:
exception- the exception to display
-
disposeEditDialogOnEscape
public final is.codion.common.state.State disposeEditDialogOnEscape()- Returns:
- the State controlling whtether the edit dialog is disposed of on ESC
- See Also:
-
editPanelState
- Returns:
- the value controlling the edit panel state, either HIDDEN, EMBEDDED or WINDOW
-
requestInitialFocus
public final void requestInitialFocus()Requests focus for this panel. If an edit panel is available and not hidden, the component defined as the initialFocusComponent gets the input focus. If no edit panel is available the table panel gets the focus, otherwise the first child component of this EntityPanel is used. -
savePreferences
public void savePreferences()Saves any user preferences for all entity panels and associated elements -
setFocusCycleRoot
public final void setFocusCycleRoot(boolean focusCycleRoot) - Overrides:
setFocusCycleRootin classContainer
-
builder
Instantiates a new EntityPanel.Builder- Parameters:
entityType- the entity type to base this panel builder on- Returns:
- a panel builder
-
builder
public static EntityPanel.Builder builder(is.codion.swing.framework.model.SwingEntityModel.Builder modelBuilder) Instantiates a new EntityPanel.Builder- Parameters:
modelBuilder- the SwingEntityModel.Builder to base this panel builder on- Returns:
- a panel builder
-
builder
Instantiates a new EntityPanel.Builder- Parameters:
model- the SwingEntityModel to base this panel builder on- Returns:
- a panel builder
-
initializeUI
protected void initializeUI()Initializes this EntityPanels UI.- See Also:
-
panelLayout()editControlPanel()editControlTablePanel()
-
createEditBasePanel
Creates a base panel containing the given edit panel. The default layout is aFlowLayoutwith the alignment depending onEntityPanel.Settings.controlComponentConstraints(String). The resulting panel is added atBorderLayout.CENTERon theeditControlPanel()- Parameters:
editPanel- the initialized edit panel- Returns:
- a base panel for the edit panel
- See Also:
-
createControlComponent
Creates the component to place next to the edit panel, containing the available controls, such as insert, update, delete, clear and refresh.- Parameters:
controls- the controls to display on the component- Returns:
- the component containing the edit and table panel controls, null if no controls are available
- See Also:
-
createControls
protected is.codion.swing.common.ui.control.Controls createControls()Creates theControlsinstance on which to base the controls component. By default all controls fromEntityEditPanel.controlsare included and if a table panel is available a table refresh controls is included as well.- Returns:
- the control component controls, an empty
Controlsinstance in case of no controls. - See Also:
-
editControlTablePanel
Returns the base panel containing the edit and table panels (north, center).- Returns:
- the edit and table base panel
-
setupKeyboardActions
protected final void setupKeyboardActions()Sets up the keyboard navigation actions. CTRL-T transfers focus to the table in case one is available, CTR-E transfers focus to the edit panel in case one is available, CTR-S opens a select search condition panel dialog, in case one is available, CTR-I opens a select input field dialog and CTR-F selects the table search field -
createSelectInputComponentControl
protected final is.codion.swing.common.ui.control.Control createSelectInputComponentControl()- Returns:
- a Control instance for selecting a input component
-
createRequestEditPanelFocusControl
protected final is.codion.swing.common.ui.control.Control createRequestEditPanelFocusControl()- Returns:
- a Control instance for requesting edit panel focus
-
createRequestTableSearchFieldControl
protected final is.codion.swing.common.ui.control.Control createRequestTableSearchFieldControl()- Returns:
- a Control instance for requesting table search field focus
-
createToggleEditPanelControl
protected final is.codion.swing.common.ui.control.Control createToggleEditPanelControl()- Returns:
- a Control instance for toggling the edit panel state
-
createRefreshTableControl
protected final is.codion.swing.common.ui.control.Control createRefreshTableControl()- Returns:
- a Control instance for refreshing the table model
-
initializeEditPanel
protected final void initializeEditPanel()Initializes the edit panel, if one is available. -
initializeTablePanel
protected final void initializeTablePanel()Initializes the table panel, if one is available.
-