public abstract class EntityEditPanel extends javax.swing.JPanel implements DialogExceptionHandler
EntityEditModel
.Modifier and Type | Class and Description |
---|---|
protected static class |
EntityEditPanel.ConfirmType
The actions meriting user confirmation
|
static class |
EntityEditPanel.ControlCode
The standard controls available to the EditPanel
|
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
static PropertyValue<java.lang.Boolean> |
ALL_PANELS_ACTIVE
Indicates whether all entity panels should be enabled and receiving input by default
Value type: Boolean Default value: false |
static PropertyValue<java.lang.Boolean> |
TRANSFER_FOCUS_ON_ENTER
Specifies whether focus should be transferred from components on enter,
this does not work for editable combo boxes, combo boxes with the
maximum match functionality enabled or text areas
Value type: Boolean Default value: true |
static PropertyValue<java.lang.Boolean> |
USE_SAVE_CONTROL
Specifies whether edit panels should include a SAVE button (insert or update, depending on selection) or just a INSERT button
Value type: Boolean Default value: true |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
EntityEditPanel(SwingEntityEditModel editModel)
Instantiates a new EntityEditPanel based on the given
EntityEditModel |
EntityEditPanel(SwingEntityEditModel editModel,
EntityEditPanel.ControlCode... controlCodes)
Instantiates a new EntityEditPanel based on the given
EntityEditModel |
Modifier and Type | Method and Description |
---|---|
protected void |
addPropertyPanel(java.lang.String propertyId)
Adds a property panel for the given property to this panel
|
void |
clearModelValues()
Clears the values from the underlying model
|
protected boolean |
confirm(java.lang.String message,
java.lang.String title)
Presents a OK/Cancel confirm dialog with the given message and title,
returns true if OK was selected.
|
protected boolean |
confirmDelete()
Called before a delete is performed, if true is returned the delete action is performed otherwise it is cancelled
|
protected boolean |
confirmInsert()
Called before a insert is performed, the default implementation simply returns true
|
protected boolean |
confirmUpdate()
Called before an update is performed, if true is returned the update action is performed otherwise it is cancelled
|
protected javax.swing.JComboBox |
createBooleanComboBox(Property property)
Create a JComboBox for the given property, containing
values for the boolean values: true, false, null
|
protected javax.swing.JComboBox |
createBooleanComboBox(Property property,
StateObserver enabledState)
Create a JComboBox for the given property, containing
values for the boolean values: true, false, null
|
protected javax.swing.JComboBox |
createBooleanComboBox(java.lang.String propertyId)
Create a JComboBox for the property identified by
propertyId , containing
values for the boolean values: true, false, null |
protected javax.swing.JComboBox |
createBooleanComboBox(java.lang.String propertyId,
StateObserver enabledState)
Create a JComboBox for the property identified by
propertyId , containing
values for the boolean values: true, false, null |
protected javax.swing.JCheckBox |
createCheckBox(Property property)
Creates a JCheckBox bound to the given property
|
protected javax.swing.JCheckBox |
createCheckBox(Property property,
StateObserver enabledState)
Creates a JCheckBox bound to the given property
|
protected javax.swing.JCheckBox |
createCheckBox(Property property,
StateObserver enabledState,
boolean includeCaption)
Creates a JCheckBox bound to the given property
|
protected javax.swing.JCheckBox |
createCheckBox(java.lang.String propertyId)
Creates a JCheckBox bound to the property identified by
propertyId |
protected javax.swing.JCheckBox |
createCheckBox(java.lang.String propertyId,
StateObserver enabledState)
Creates a JCheckBox bound to the property identified by
propertyId |
protected javax.swing.JCheckBox |
createCheckBox(java.lang.String propertyId,
StateObserver enabledState,
boolean includeCaption)
Creates a JCheckBox bound to the property identified by
propertyId |
protected SteppedComboBox |
createComboBox(Property property,
javax.swing.ComboBoxModel comboBoxModel,
boolean maximumMatch)
Creates a SteppedComboBox bound to the given property
|
protected SteppedComboBox |
createComboBox(Property property,
javax.swing.ComboBoxModel comboBoxModel,
boolean maximumMatch,
StateObserver enabledState)
Creates a SteppedComboBox bound to the given property
|
protected SteppedComboBox |
createComboBox(java.lang.String propertyId,
javax.swing.ComboBoxModel comboBoxModel,
boolean maximumMatch)
Creates a SteppedComboBox bound to the property identified by
propertyId |
protected SteppedComboBox |
createComboBox(java.lang.String propertyId,
javax.swing.ComboBoxModel comboBoxModel,
boolean maximumMatch,
StateObserver enabledState)
Creates a SteppedComboBox bound to the property identified by
propertyId |
javax.swing.JPanel |
createControlPanel(boolean horizontal)
Initializes the control panel, that is, the panel containing buttons for editing entities (Insert, Update...)
|
javax.swing.JToolBar |
createControlToolBar(int orientation)
Initializes the control toolbar, that is, the toolbar containing buttons for editing entities (Insert, Update...)
|
protected TemporalInputPanel |
createDateInputPanel(Property property)
Creates a new DateInputPanel bound to the property identified by
propertyId . |
protected TemporalInputPanel |
createDateInputPanel(Property property,
boolean includeButton)
Creates a new DateInputPanel bound to the given property.
|
protected TemporalInputPanel |
createDateInputPanel(Property property,
boolean includeButton,
StateObserver enabledState)
Creates a new DateInputPanel bound to the given property.
|
protected TemporalInputPanel |
createDateInputPanel(Property property,
boolean includeButton,
StateObserver enabledState,
boolean updateOnKeystroke)
Creates a new DateInputPanel bound to the given property.
|
protected TemporalInputPanel |
createDateInputPanel(java.lang.String propertyId)
Creates a new DateInputPanel using the default short date format, bound to the property
identified by
propertyId . |
protected TemporalInputPanel |
createDateInputPanel(java.lang.String propertyId,
boolean includeButton)
Creates a new DateInputPanel bound to the property identified by
propertyId . |
protected TemporalInputPanel |
createDateInputPanel(java.lang.String propertyId,
boolean includeButton,
StateObserver enabledState)
Creates a new DateInputPanel bound to the property identified by
propertyId . |
protected TemporalInputPanel |
createDateInputPanel(java.lang.String propertyId,
boolean includeButton,
StateObserver enabledState,
boolean updateOnKeystroke)
Creates a new DateInputPanel bound to the property identified by
propertyId . |
protected SteppedComboBox |
createEditableComboBox(Property property,
javax.swing.ComboBoxModel comboBoxModel,
StateObserver enabledState)
Creates an editable SteppedComboBox bound to the given property
|
protected SteppedComboBox |
createEditableComboBox(java.lang.String propertyId,
javax.swing.ComboBoxModel comboBoxModel)
Creates an editable SteppedComboBox bound to the property identified by
propertyId |
protected SteppedComboBox |
createEditableComboBox(java.lang.String propertyId,
javax.swing.ComboBoxModel comboBoxModel,
StateObserver enabledState)
Creates an editable SteppedComboBox bound to the property identified by
propertyId |
static javax.swing.Action |
createEditPanelAction(EntityComboBox comboBox,
EntityPanelProvider panelProvider)
Creates a new Action which shows the edit panel provided by
panelProvider and if an insert is performed
selects the new entity in the lookupField . |
static javax.swing.Action |
createEditPanelAction(EntityLookupField lookupField,
EntityPanelProvider panelProvider)
Creates a new Action which shows the edit panel provided by
panelProvider and if an insert is performed
selects the new entity in the lookupField . |
static javax.swing.Action |
createEditPanelAction(javax.swing.JComponent component,
EntityPanelProvider panelProvider,
EntityConnectionProvider connectionProvider,
EventDataListener<java.util.List<Entity>> insertListener)
Creates a new Action which shows the edit panel provided by
panelProvider and if an insert is performed
insertListener is notified. |
protected EntityComboBox |
createForeignKeyComboBox(ForeignKeyProperty foreignKeyProperty)
Creates an EntityComboBox bound to the given foreign key property
|
protected EntityComboBox |
createForeignKeyComboBox(ForeignKeyProperty foreignKeyProperty,
StateObserver enabledState)
Creates an EntityComboBox bound to the given foreign key property
|
protected EntityComboBox |
createForeignKeyComboBox(java.lang.String foreignKeyPropertyId)
Creates an EntityComboBox bound to the foreign key property identified by
foreignKeyPropertyId |
protected EntityComboBox |
createForeignKeyComboBox(java.lang.String foreignKeyPropertyId,
StateObserver enabledState)
Creates a EntityComboBox bound to the foreign key property identified by
foreignKeyPropertyId |
protected javax.swing.JTextField |
createForeignKeyField(ForeignKeyProperty foreignKeyProperty)
Creates an uneditable JTextField bound to the given property
|
protected javax.swing.JTextField |
createForeignKeyField(java.lang.String propertyId)
Creates an uneditable JTextField bound to the property identified by
propertyId |
protected EntityLookupField |
createForeignKeyLookupField(ForeignKeyProperty foreignKeyProperty)
Creates an EntityLookupField bound to the given foreign key property
|
protected EntityLookupField |
createForeignKeyLookupField(ForeignKeyProperty foreignKeyProperty,
StateObserver enabledState)
Creates an EntityLookupField bound to the given foreign key property
|
protected EntityLookupField |
createForeignKeyLookupField(java.lang.String foreignKeyPropertyId)
Creates an EntityLookupField bound to the property identified by
foreignKeypropertyId , the property
must be an Property.ForeignKeyProperty |
protected EntityLookupField |
createForeignKeyLookupField(java.lang.String foreignKeyPropertyId,
StateObserver enabledState)
Creates an EntityLookupField bound to the property identified by
foreignKeypropertyId , the property
must be an Property.ForeignKeyProperty |
protected javax.swing.JLabel |
createLabel(java.lang.String propertyId)
Creates a JLabel with a caption from the property identified by
propertyId |
protected javax.swing.JLabel |
createLabel(java.lang.String propertyId,
int horizontalAlignment)
Creates a JLabel with a caption from the given property identified by
propertyId |
protected SteppedComboBox |
createPropertyComboBox(ColumnProperty property)
Creates a SteppedComboBox bound to the given property, the combo box
contains the underlying values of the property
|
protected SteppedComboBox |
createPropertyComboBox(ColumnProperty property,
StateObserver enabledState)
Creates a SteppedComboBox bound to the given property, the combo box
contains the underlying values of the property
|
protected SteppedComboBox |
createPropertyComboBox(ColumnProperty property,
StateObserver enabledState,
boolean editable)
Creates a SteppedComboBox bound to the given property, the combo box
contains the underlying values of the property
|
protected SteppedComboBox |
createPropertyComboBox(java.lang.String propertyId)
Creates a SteppedComboBox bound to the property identified by
propertyId , the combo box
contains the underlying values of the property |
protected SteppedComboBox |
createPropertyComboBox(java.lang.String propertyId,
StateObserver enabledState)
Creates a SteppedComboBox bound to the property identified by
propertyId , the combo box
contains the underlying values of the property |
protected SteppedComboBox |
createPropertyComboBox(java.lang.String propertyId,
StateObserver enabledState,
boolean editable)
Creates a SteppedComboBox bound to the property identified by
propertyId , the combo box
contains the underlying values of the property |
protected javax.swing.JPanel |
createPropertyPanel(javax.swing.JComponent labelComponent,
javax.swing.JComponent inputComponent)
Creates a panel containing a label component and the
inputComponent with the label
component positioned above the input component. |
protected javax.swing.JPanel |
createPropertyPanel(javax.swing.JComponent labelComponent,
javax.swing.JComponent inputComponent,
boolean labelOnTop)
Creates a panel containing a label component and the
inputComponent . |
protected javax.swing.JPanel |
createPropertyPanel(java.lang.String propertyId)
Creates a panel containing a label and the component associated with the given property.
|
protected javax.swing.JPanel |
createPropertyPanel(java.lang.String propertyId,
javax.swing.JComponent inputComponent)
Creates a panel containing a label and the given component.
|
protected javax.swing.JPanel |
createPropertyPanel(java.lang.String propertyId,
javax.swing.JComponent inputComponent,
boolean labelOnTop)
Creates a panel containing a label and the given component.
|
protected javax.swing.JPanel |
createPropertyPanel(java.lang.String propertyId,
javax.swing.JComponent inputComponent,
boolean labelOnTop,
int labelAlignment)
Creates a panel containing a label and the given component.
|
protected javax.swing.JTextArea |
createTextArea(java.lang.String propertyId)
Creates a JTextArea component bound to the property identified by
propertyId . |
protected javax.swing.JTextArea |
createTextArea(java.lang.String propertyId,
int rows,
int columns)
Creates a JTextArea component bound to the property identified by
propertyId . |
protected javax.swing.JTextArea |
createTextArea(java.lang.String propertyId,
int rows,
int columns,
boolean updateOnKeystroke)
Creates a JTextArea component bound to the property identified by
propertyId . |
protected javax.swing.JTextArea |
createTextArea(java.lang.String propertyId,
int rows,
int columns,
boolean updateOnKeystroke,
StateObserver enabledState)
Creates a JTextArea component bound to the property identified by
propertyId . |
protected javax.swing.JTextField |
createTextField(Property property)
Creates a JTextField bound to the given property
|
protected javax.swing.JTextField |
createTextField(Property property,
boolean updateOnKeystroke)
Creates a JTextField bound to the given property
|
protected javax.swing.JTextField |
createTextField(Property property,
boolean updateOnKeystroke,
java.lang.String maskString,
StateObserver enabledState,
boolean valueIncludesLiteralCharacters)
Creates a JTextField bound to the given property
|
protected javax.swing.JTextField |
createTextField(Property property,
java.lang.String maskString,
boolean updateOnKeystroke)
Creates a JTextField bound to the given property
|
protected javax.swing.JTextField |
createTextField(Property property,
java.lang.String maskString,
boolean updateOnKeystroke,
StateObserver enabledState)
Creates a JTextField bound to the given property
|
protected javax.swing.JTextField |
createTextField(java.lang.String propertyId)
Creates a JTextField bound to the property identified by
propertyId |
protected javax.swing.JTextField |
createTextField(java.lang.String propertyId,
boolean updateOnKeystroke)
Creates a JTextField bound to the property identified by
propertyId |
protected javax.swing.JTextField |
createTextField(java.lang.String propertyId,
boolean updateOnKeystroke,
java.lang.String maskString)
Creates a JTextField bound to the property identified by
propertyId |
protected javax.swing.JTextField |
createTextField(java.lang.String propertyId,
boolean updateOnKeystroke,
java.lang.String maskString,
StateObserver enabledState)
Creates a JTextField bound to the property identified by
propertyId |
protected javax.swing.JTextField |
createTextField(java.lang.String propertyId,
boolean updateOnKeystroke,
java.lang.String maskString,
StateObserver enabledState,
boolean valueIncludesLiteralCharacters)
Creates a JTextField bound to the property identified by
propertyId |
protected TextInputPanel |
createTextInputPanel(Property property,
boolean updateOnKeystroke)
Creates a TextInputPanel bound to the property identified by
propertyId . |
protected TextInputPanel |
createTextInputPanel(Property property,
boolean updateOnKeystroke,
boolean buttonFocusable)
Creates a TextInputPanel bound to the property identified by
propertyId . |
protected TextInputPanel |
createTextInputPanel(java.lang.String propertyId)
Creates a TextInputPanel bound to the property identified by
propertyId . |
protected TextInputPanel |
createTextInputPanel(java.lang.String propertyId,
boolean updateOnKeystroke,
boolean buttonFocusable)
Creates a TextInputPanel bound to the property identified by
propertyId . |
protected TristateCheckBox |
createTristateCheckBox(Property property)
Creates a TristateCheckBox bound to the given property
|
protected TristateCheckBox |
createTristateCheckBox(Property property,
StateObserver enabledState)
Creates a TristateCheckBox bound to the given property
|
protected TristateCheckBox |
createTristateCheckBox(Property property,
StateObserver enabledState,
boolean includeCaption)
Creates a TristateCheckBox bound to the given property
|
protected TristateCheckBox |
createTristateCheckBox(java.lang.String propertyId)
Creates a TristateCheckBox bound to the property identified by
propertyId |
protected TristateCheckBox |
createTristateCheckBox(java.lang.String propertyId,
StateObserver enabledState)
Creates a TristateCheckBox bound to the property identified by
propertyId |
protected TristateCheckBox |
createTristateCheckBox(java.lang.String propertyId,
StateObserver enabledState,
boolean includeCaption)
Creates a TristateCheckBox bound to the property identified by
propertyId |
protected SteppedComboBox |
createValueListComboBox(java.lang.String propertyId)
Creates a SteppedComboBox containing the values defined by the given value list property,
bound to the given property.
|
protected SteppedComboBox |
createValueListComboBox(java.lang.String propertyId,
boolean sortItems)
Creates a SteppedComboBox containing the values defined by the given value list property,
bound to the given property.
|
protected SteppedComboBox |
createValueListComboBox(java.lang.String propertyId,
boolean sortItems,
StateObserver enabledState)
Creates a SteppedComboBox containing the values defined by the given value list property,
bound to the given property.
|
protected SteppedComboBox |
createValueListComboBox(java.lang.String propertyId,
StateObserver enabledState)
Creates a SteppedComboBox containing the values defined by the given value list property,
bound to the given property.
|
protected SteppedComboBox |
createValueListComboBox(ValueListProperty property)
Creates a SteppedComboBox containing the values defined in the given value list property,
bound to the given property.
|
protected SteppedComboBox |
createValueListComboBox(ValueListProperty property,
boolean sortItems)
Creates a SteppedComboBox containing the values defined in the given value list property,
bound to the given property.
|
protected SteppedComboBox |
createValueListComboBox(ValueListProperty property,
boolean sortItems,
StateObserver enabledState)
Creates a SteppedComboBox containing the values defined in the given value list property,
bound to the given property.
|
protected SteppedComboBox |
createValueListComboBox(ValueListProperty property,
StateObserver enabledState)
Creates a SteppedComboBox containing the values defined in the given value list property,
bound to the given property.
|
boolean |
delete()
Performs a delete on the active entity
|
boolean |
delete(boolean confirmRequired)
Performs a delete on the active entity
|
void |
displayException(java.lang.Throwable throwable,
java.awt.Window dialogParent)
Handle the given exception and display it to the user.
|
StateObserver |
getActiveObserver()
Indicates whether this panel is active and ready to receive input
|
protected javax.swing.JComponent |
getAfterInsertFocusComponent() |
Control |
getClearControl() |
javax.swing.JComponent |
getComponent(java.lang.String propertyId) |
java.lang.String |
getComponentPropertyId(javax.swing.JComponent component) |
java.util.List<java.lang.String> |
getComponentPropertyIds() |
protected java.lang.String[] |
getConfirmationMessages(EntityEditPanel.ConfirmType type) |
Control |
getControl(EntityEditPanel.ControlCode controlCode) |
Control |
getDeleteControl() |
SwingEntityEditModel |
getEditModel() |
protected javax.swing.JComponent |
getInitialFocusComponent() |
Control |
getInsertControl() |
Control |
getRefreshControl() |
Control |
getSaveControl() |
java.util.List<java.lang.String> |
getSelectComponentPropertyIds() |
Control |
getUpdateControl() |
protected void |
handleException(DatabaseException exception)
Handles DatabaseExceptions
By default displays the exception message to the user.
|
void |
handleException(java.lang.Throwable throwable)
Handles the given exception, which usually means simply logging it and displaying it to the user.
|
protected void |
handleException(ValidationException exception)
Handles ValidationExceptions.
|
boolean |
includeComponentSelectionPropertyId(java.lang.String propertyId)
Override to exclude components from the component focus selection.
|
protected ControlSet |
initializeControlPanelControlSet()
Initializes a ControlSet on which to base the control panel
|
EntityEditPanel |
initializePanel()
Initializes this EntityEditPanel UI.
|
protected abstract void |
initializeUI()
Initializes this EntityEditPanel UI, that is, creates and lays out the components
required for editing the underlying entity type.
|
boolean |
insert()
Performs a insert on the active entity
|
boolean |
insert(boolean confirmRequired)
Performs a insert on the active entity
|
boolean |
isClearAfterInsert() |
boolean |
isPanelInitialized() |
boolean |
isRequestFocusAfterInsert() |
void |
prepareUI(boolean requestInitialFocus,
boolean clearUI)
Prepares the UI.
|
void |
requestComponentFocus(java.lang.String propertyId)
Request focus for the component associated with the given propertyId
|
void |
requestInitialFocus()
Sets the initial focus, if a initial focus component or component propertyId
has been set that component receives the focus, if not, or if that component
is not focusable, this panel receives the focus
|
void |
save()
Saves the active entity, that is, if no entity is selected it performs a insert otherwise the user
is asked whether to update the selected entity or insert a new one
|
void |
selectInputComponent()
Displays a dialog allowing the user the select a input component which should receive the keyboard focus,
if only one input component is available then that component is selected automatically.
|
void |
setActive(boolean active)
Sets the active state of this edit panel, an active edit panel should be
enabled and ready to receive input
|
javax.swing.JComponent |
setAfterInsertFocusComponent(javax.swing.JComponent afterInsertFocusComponent)
Sets the component that should receive the focus after an insert has been performed..
|
void |
setAfterInsertFocusProperty(java.lang.String propertyId)
Sets the component associated with the given propertyId as the component
that should receive the focus after an insert is performed in this edit panel.
|
void |
setClearAfterInsert(boolean clearAfterInsert) |
protected void |
setComponent(java.lang.String propertyId,
javax.swing.JComponent component)
Associates the given input component with the given propertyId,
preferably this should be called for components associated with
properties.
|
protected void |
setControl(EntityEditPanel.ControlCode controlCode,
Control control)
Associates
control with controlCode |
javax.swing.JComponent |
setInitialFocusComponent(javax.swing.JComponent initialFocusComponent)
Sets the component that should receive the focus when the UI is cleared or activated.
|
void |
setInitialFocusProperty(java.lang.String propertyId)
Sets the component associated with the given propertyId as the component
that should receive the initial focus in this edit panel.
|
void |
setReferentialIntegrityErrorHandling(EntityTablePanel.ReferentialIntegrityErrorHandling referentialIntegrityErrorHandling) |
void |
setRequestFocusAfterInsert(boolean requestFocusAfterInsert) |
java.lang.String |
toString() |
boolean |
update()
Performs an update on the active entity
|
boolean |
update(boolean confirmRequired)
Performs an update on the active entity
|
protected void |
validateData()
for overriding, called before insert/update
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, update
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, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
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, getPeer, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final PropertyValue<java.lang.Boolean> TRANSFER_FOCUS_ON_ENTER
public static final PropertyValue<java.lang.Boolean> ALL_PANELS_ACTIVE
EntityPanel.USE_FOCUS_ACTIVATION
public static final PropertyValue<java.lang.Boolean> USE_SAVE_CONTROL
public EntityEditPanel(SwingEntityEditModel editModel)
EntityEditModel
editModel
- the EntityEditModel
instance to base this EntityEditPanel onpublic EntityEditPanel(SwingEntityEditModel editModel, EntityEditPanel.ControlCode... controlCodes)
EntityEditModel
editModel
- the EntityEditModel
instance to base this EntityEditPanel oncontrolCodes
- if specified only controls with those keys are initialized,
null or an empty String array will result in no controls being initializedpublic final java.lang.String toString()
toString
in class java.awt.Component
public final SwingEntityEditModel getEditModel()
public final StateObserver getActiveObserver()
public final void setActive(boolean active)
active
- the active statepublic final void prepareUI(boolean requestInitialFocus, boolean clearUI)
requestInitialFocus
- if true then the initial focus is setclearUI
- if true the UI is cleared.Refreshable.clear()
public final javax.swing.JComponent setInitialFocusComponent(javax.swing.JComponent initialFocusComponent)
setInitialFocusProperty(String)
initialFocusComponent
- the componentprepareUI(boolean, boolean)
public final void setInitialFocusProperty(java.lang.String propertyId)
propertyId
- the component propertyIdsetInitialFocusComponent(javax.swing.JComponent)
public final javax.swing.JComponent setAfterInsertFocusComponent(javax.swing.JComponent afterInsertFocusComponent)
setAfterInsertFocusProperty(String)
afterInsertFocusComponent
- the componentpublic final void setAfterInsertFocusProperty(java.lang.String propertyId)
propertyId
- the component propertyIdsetAfterInsertFocusComponent(JComponent)
public final void requestInitialFocus()
public final java.util.List<java.lang.String> getComponentPropertyIds()
public final javax.swing.JComponent getComponent(java.lang.String propertyId)
propertyId
- the propertyIdpublic final java.lang.String getComponentPropertyId(javax.swing.JComponent component)
component
- the componentpublic void selectInputComponent()
public final void requestComponentFocus(java.lang.String propertyId)
propertyId
- the propertyId of the component to selectpublic final java.util.List<java.lang.String> getSelectComponentPropertyIds()
(String)
,
setComponent(String, javax.swing.JComponent)
public boolean includeComponentSelectionPropertyId(java.lang.String propertyId)
propertyId
- the component propertyIdpublic final void clearModelValues()
public final boolean isClearAfterInsert()
public final void setClearAfterInsert(boolean clearAfterInsert)
clearAfterInsert
- true if the UI should be cleared after insert has been performedpublic final boolean isRequestFocusAfterInsert()
requestInitialFocus()
public final void setRequestFocusAfterInsert(boolean requestFocusAfterInsert)
requestFocusAfterInsert
- true if the UI should request focus after insert has been performedrequestInitialFocus()
public final void setReferentialIntegrityErrorHandling(EntityTablePanel.ReferentialIntegrityErrorHandling referentialIntegrityErrorHandling)
referentialIntegrityErrorHandling
- the action to take on a referential integrity error on deletepublic final Control getControl(EntityEditPanel.ControlCode controlCode)
controlCode
- the control codecontrolCode
java.lang.IllegalArgumentException
- in case no control is associated with the given control codepublic final Control getRefreshControl()
public final Control getDeleteControl()
public final Control getClearControl()
public final Control getUpdateControl()
public final Control getInsertControl()
public final Control getSaveControl()
public final void handleException(java.lang.Throwable throwable)
throwable
- the exception to handlepublic final void displayException(java.lang.Throwable throwable, java.awt.Window dialogParent)
displayException
in interface DialogExceptionHandler
throwable
- the exceptiondialogParent
- the Window to use as parent to the exception dialogpublic final javax.swing.JPanel createControlPanel(boolean horizontal)
horizontal
- true if the buttons should be laid out horizontally, false otherwiseinitializeControlPanelControlSet()
public final javax.swing.JToolBar createControlToolBar(int orientation)
orientation
- the orientationinitializeControlPanelControlSet()
public final EntityEditPanel initializePanel()
isPanelInitialized()
public final boolean isPanelInitialized()
initializePanel()
public final void save()
public final boolean insert()
public final boolean insert(boolean confirmRequired)
confirmRequired
- if true then confirmInsert() is calledpublic final boolean delete()
public final boolean delete(boolean confirmRequired)
confirmRequired
- if true then confirmDelete() is calledpublic final boolean update()
public final boolean update(boolean confirmRequired)
confirmRequired
- if true then confirmUpdate() is calledpublic static javax.swing.Action createEditPanelAction(EntityComboBox comboBox, EntityPanelProvider panelProvider)
panelProvider
and if an insert is performed
selects the new entity in the lookupField
.comboBox
- the combo box in which to select the new entity, if createdpanelProvider
- the EntityPanelProvider for providing the EntityEditPanel to use for creating the new entitypublic static javax.swing.Action createEditPanelAction(EntityLookupField lookupField, EntityPanelProvider panelProvider)
panelProvider
and if an insert is performed
selects the new entity in the lookupField
.lookupField
- the lookup field in which to select the new entity, if createdpanelProvider
- the EntityPanelProvider for providing the EntityEditPanel to use for creating the new entitypublic static javax.swing.Action createEditPanelAction(javax.swing.JComponent component, EntityPanelProvider panelProvider, EntityConnectionProvider connectionProvider, EventDataListener<java.util.List<Entity>> insertListener)
panelProvider
and if an insert is performed
insertListener
is notified.component
- this component used as dialog parent, receives the focus after insertpanelProvider
- the EntityPanelProvider for providing the EntityEditPanel to use for creating the new entityconnectionProvider
- the connection providerinsertListener
- the listener notified when insert has been performedprotected void validateData() throws ValidationException
ValidationException
- in case of a validation failureprotected void handleException(ValidationException exception)
exception
- the exception to handleprotected void handleException(DatabaseException exception)
exception
- the exception to handleprotected boolean confirmInsert()
protected boolean confirmDelete()
protected boolean confirmUpdate()
protected boolean confirm(java.lang.String message, java.lang.String title)
message
- the messagetitle
- the dialog titleprotected java.lang.String[] getConfirmationMessages(EntityEditPanel.ConfirmType type)
type
- the confirmation message typeprotected final void setControl(EntityEditPanel.ControlCode controlCode, Control control)
control
with controlCode
controlCode
- the control codecontrol
- the control to associate with controlCode
protected ControlSet initializeControlPanelControlSet()
protected abstract void initializeUI()
protected void initializeUI() { createTextField(DomainModel.USER_NAME); createTextField(DomainModel.USER_ADDRESS); setLayout(new GridLayout(2, 1, 5, 5); addPropertyPanel(DomainModel.USER_NAME); addPropertyPanel(DomainModel.USER_ADDRESS); }
protected javax.swing.JComponent getInitialFocusComponent()
prepareUI(boolean, boolean)
protected javax.swing.JComponent getAfterInsertFocusComponent()
protected final void setComponent(java.lang.String propertyId, javax.swing.JComponent component)
propertyId
- the propertyIdcomponent
- the input componentprotected final void addPropertyPanel(java.lang.String propertyId)
propertyId
- the ID of the propertycreatePropertyPanel(String)
protected final javax.swing.JPanel createPropertyPanel(java.lang.String propertyId)
propertyId
.
The default layout of the resulting panel is with the label on top and inputComponent below.propertyId
- the id of the property from which to retrieve the label captionjava.lang.IllegalArgumentException
- in case no component has been associated with the given propertyprotected final javax.swing.JPanel createPropertyPanel(java.lang.String propertyId, javax.swing.JComponent inputComponent)
propertyId
.
The default layout of the resulting panel is with the label on top and inputComponent
below.propertyId
- the id of the property from which to retrieve the label captioninputComponent
- a component bound to the property with id propertyId
protected final javax.swing.JPanel createPropertyPanel(java.lang.String propertyId, javax.swing.JComponent inputComponent, boolean labelOnTop)
propertyId
.propertyId
- the id of the property from which to retrieve the label captioninputComponent
- a component bound to the property with id propertyId
labelOnTop
- if true then the label is positioned above inputComponent
,
otherwise it uses FlowLayout.LEADING in a FlowLayout.protected final javax.swing.JPanel createPropertyPanel(java.lang.String propertyId, javax.swing.JComponent inputComponent, boolean labelOnTop, int labelAlignment)
propertyId
.propertyId
- the id of the property from which to retrieve the label captioninputComponent
- a component bound to the property with id propertyId
labelOnTop
- if true then the label is positioned above inputComponent
,
otherwise it uses FlowLayout.LEADING in a FlowLayout.labelAlignment
- the label alignmentprotected final javax.swing.JPanel createPropertyPanel(javax.swing.JComponent labelComponent, javax.swing.JComponent inputComponent)
inputComponent
with the label
component positioned above the input component.labelComponent
- the label componentinputComponent
- a component bound to the property with id propertyId
protected final javax.swing.JPanel createPropertyPanel(javax.swing.JComponent labelComponent, javax.swing.JComponent inputComponent, boolean labelOnTop)
inputComponent
.labelComponent
- the label componentinputComponent
- a component bound to the property with id propertyId
labelOnTop
- if true then the label is positioned above inputComponent
,
otherwise it uses FlowLayout.LEADING in a FlowLayout.protected final javax.swing.JTextArea createTextArea(java.lang.String propertyId)
propertyId
.propertyId
- the ID of the property to bindprotected final javax.swing.JTextArea createTextArea(java.lang.String propertyId, int rows, int columns)
propertyId
.propertyId
- the ID of the property to bindrows
- the number of rows in the text areacolumns
- the number of columns in the text areaprotected final javax.swing.JTextArea createTextArea(java.lang.String propertyId, int rows, int columns, boolean updateOnKeystroke)
propertyId
.propertyId
- the ID of the property to bindrows
- the number of rows in the text areacolumns
- the number of columns in the text areaupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostprotected final javax.swing.JTextArea createTextArea(java.lang.String propertyId, int rows, int columns, boolean updateOnKeystroke, StateObserver enabledState)
propertyId
.propertyId
- the ID of the property to bindrows
- the number of rows in the text areacolumns
- the number of columns in the text areaupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostenabledState
- a state indicating when this text area should be enabledprotected final TextInputPanel createTextInputPanel(java.lang.String propertyId)
propertyId
.propertyId
- the ID of the property to bindprotected final TextInputPanel createTextInputPanel(java.lang.String propertyId, boolean updateOnKeystroke, boolean buttonFocusable)
propertyId
.propertyId
- the ID of the property to bindupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostbuttonFocusable
- specifies whether the edit button should be focusable.protected final TextInputPanel createTextInputPanel(Property property, boolean updateOnKeystroke)
propertyId
.property
- the property to bindupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostprotected final TextInputPanel createTextInputPanel(Property property, boolean updateOnKeystroke, boolean buttonFocusable)
propertyId
.property
- the property to bindupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostbuttonFocusable
- specifies whether the edit button should be focusable.protected final TemporalInputPanel createDateInputPanel(java.lang.String propertyId)
propertyId
.propertyId
- the ID of the property for which to create the panelProperty.DATE_FORMAT
protected final TemporalInputPanel createDateInputPanel(java.lang.String propertyId, boolean includeButton)
propertyId
.propertyId
- the ID of the property for which to create the panelincludeButton
- if true a button for visually editing the date is includedProperty.DATE_FORMAT
protected final TemporalInputPanel createDateInputPanel(java.lang.String propertyId, boolean includeButton, StateObserver enabledState)
propertyId
.propertyId
- the ID of the property for which to create the panelincludeButton
- if true a button for visually editing the date is includedenabledState
- a state for controlling the enabled state of the input componentprotected final TemporalInputPanel createDateInputPanel(java.lang.String propertyId, boolean includeButton, StateObserver enabledState, boolean updateOnKeystroke)
propertyId
.propertyId
- the ID of the property for which to create the panelincludeButton
- if true a button for visually editing the date is includedenabledState
- a state for controlling the enabled state of the input componentupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostprotected final TemporalInputPanel createDateInputPanel(Property property)
propertyId
.property
- the property for which to create the panelprotected final TemporalInputPanel createDateInputPanel(Property property, boolean includeButton)
property
- the property for which to create the panelincludeButton
- if true a button for visually editing the date is includedprotected final TemporalInputPanel createDateInputPanel(Property property, boolean includeButton, StateObserver enabledState)
property
- the property for which to create the panelincludeButton
- if true a button for visually editing the date is includedenabledState
- a state for controlling the enabled state of the input componentprotected final TemporalInputPanel createDateInputPanel(Property property, boolean includeButton, StateObserver enabledState, boolean updateOnKeystroke)
property
- the property for which to create the panelincludeButton
- if true a button for visually editing the date is includedenabledState
- a state for controlling the enabled state of the input componentupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostprotected final javax.swing.JTextField createTextField(java.lang.String propertyId)
propertyId
propertyId
- the ID of the property to bindprotected final javax.swing.JTextField createTextField(java.lang.String propertyId, boolean updateOnKeystroke)
propertyId
propertyId
- the ID of the property to bindupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostprotected final javax.swing.JTextField createTextField(java.lang.String propertyId, boolean updateOnKeystroke, java.lang.String maskString)
propertyId
propertyId
- the ID of the property to bindupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostmaskString
- if specified then a JFormattedTextField with the given mask is returnedprotected final javax.swing.JTextField createTextField(java.lang.String propertyId, boolean updateOnKeystroke, java.lang.String maskString, StateObserver enabledState)
propertyId
propertyId
- the ID of the property to bindupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostmaskString
- if specified then a JFormattedTextField with the given mask is returnedenabledState
- a state for controlling the enabled state of the componentprotected final javax.swing.JTextField createTextField(java.lang.String propertyId, boolean updateOnKeystroke, java.lang.String maskString, StateObserver enabledState, boolean valueIncludesLiteralCharacters)
propertyId
propertyId
- the ID of the property to bindupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostmaskString
- if specified then a JFormattedTextField with the given mask is returnedenabledState
- a state for controlling the enabled state of the componentvalueIncludesLiteralCharacters
- only applicable if maskString
is specifiedprotected final javax.swing.JTextField createTextField(Property property)
property
- the property to bindprotected final javax.swing.JTextField createTextField(Property property, boolean updateOnKeystroke)
property
- the property to bindupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostprotected final javax.swing.JTextField createTextField(Property property, java.lang.String maskString, boolean updateOnKeystroke)
property
- the property to bindmaskString
- if specified then a JFormattedTextField with the given mask is returnedupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostprotected final javax.swing.JTextField createTextField(Property property, java.lang.String maskString, boolean updateOnKeystroke, StateObserver enabledState)
property
- the ID of the property to bindmaskString
- if specified then a JFormattedTextField with the given mask is returnedupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostenabledState
- a state for controlling the enabled state of the componentprotected final javax.swing.JTextField createTextField(Property property, boolean updateOnKeystroke, java.lang.String maskString, StateObserver enabledState, boolean valueIncludesLiteralCharacters)
property
- the property to bindupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostmaskString
- if specified then a JFormattedTextField with the given mask is returnedenabledState
- a state for controlling the enabled state of the componentvalueIncludesLiteralCharacters
- only applicable if maskString
is specifiedprotected final javax.swing.JCheckBox createCheckBox(java.lang.String propertyId)
propertyId
propertyId
- the ID of the property to bindprotected final javax.swing.JCheckBox createCheckBox(java.lang.String propertyId, StateObserver enabledState)
propertyId
propertyId
- the ID of the property to bindenabledState
- a state for controlling the enabled state of the componentprotected final javax.swing.JCheckBox createCheckBox(java.lang.String propertyId, StateObserver enabledState, boolean includeCaption)
propertyId
propertyId
- the ID of the property to bindenabledState
- a state for controlling the enabled state of the componentincludeCaption
- specifies whether or not the caption should be includedprotected final javax.swing.JCheckBox createCheckBox(Property property)
property
- the property to bindprotected final javax.swing.JCheckBox createCheckBox(Property property, StateObserver enabledState)
property
- the property to bindenabledState
- a state for controlling the enabled state of the componentprotected final javax.swing.JCheckBox createCheckBox(Property property, StateObserver enabledState, boolean includeCaption)
property
- the property to bindenabledState
- a state for controlling the enabled state of the componentincludeCaption
- specifies whether or not the caption should be includedprotected final TristateCheckBox createTristateCheckBox(java.lang.String propertyId)
propertyId
propertyId
- the ID of the property to bindprotected final TristateCheckBox createTristateCheckBox(java.lang.String propertyId, StateObserver enabledState)
propertyId
propertyId
- the ID of the property to bindenabledState
- a state for controlling the enabled state of the componentprotected final TristateCheckBox createTristateCheckBox(java.lang.String propertyId, StateObserver enabledState, boolean includeCaption)
propertyId
propertyId
- the ID of the property to bindenabledState
- a state for controlling the enabled state of the componentincludeCaption
- specifies whether or not the caption should be includedprotected final TristateCheckBox createTristateCheckBox(Property property)
property
- the property to bindprotected final TristateCheckBox createTristateCheckBox(Property property, StateObserver enabledState)
property
- the property to bindenabledState
- a state for controlling the enabled state of the componentprotected final TristateCheckBox createTristateCheckBox(Property property, StateObserver enabledState, boolean includeCaption)
property
- the property to bindenabledState
- a state for controlling the enabled state of the componentincludeCaption
- specifies whether or not the caption should be includedprotected final javax.swing.JComboBox createBooleanComboBox(java.lang.String propertyId)
propertyId
, containing
values for the boolean values: true, false, nullpropertyId
- the ID of the property to bindprotected final javax.swing.JComboBox createBooleanComboBox(java.lang.String propertyId, StateObserver enabledState)
propertyId
, containing
values for the boolean values: true, false, nullpropertyId
- the ID of the property to bindenabledState
- a state for controlling the enabled state of the componentprotected final javax.swing.JComboBox createBooleanComboBox(Property property)
property
- the property to bindprotected final javax.swing.JComboBox createBooleanComboBox(Property property, StateObserver enabledState)
property
- the property to bindenabledState
- a state for controlling the enabled state of the componentprotected final SteppedComboBox createComboBox(java.lang.String propertyId, javax.swing.ComboBoxModel comboBoxModel, boolean maximumMatch)
propertyId
propertyId
- the ID of the property to bindcomboBoxModel
- the ComboBoxModelmaximumMatch
- true if maximum match should be usedMaximumMatch
protected final SteppedComboBox createComboBox(java.lang.String propertyId, javax.swing.ComboBoxModel comboBoxModel, boolean maximumMatch, StateObserver enabledState)
propertyId
propertyId
- the ID of the property to bindcomboBoxModel
- the ComboBoxModelmaximumMatch
- true if maximum match should be usedenabledState
- a state for controlling the enabled state of the componentMaximumMatch
protected final SteppedComboBox createComboBox(Property property, javax.swing.ComboBoxModel comboBoxModel, boolean maximumMatch)
property
- the property to bindcomboBoxModel
- the ComboBoxModelmaximumMatch
- true if maximum match should be usedMaximumMatch
protected final SteppedComboBox createComboBox(Property property, javax.swing.ComboBoxModel comboBoxModel, boolean maximumMatch, StateObserver enabledState)
property
- the property to bindcomboBoxModel
- the ComboBoxModelmaximumMatch
- true if maximum match should be usedenabledState
- a state for controlling the enabled state of the componentMaximumMatch
protected final SteppedComboBox createValueListComboBox(java.lang.String propertyId)
propertyId
- the propertyIdjava.lang.IllegalArgumentException
- in case the property is not a value list propertyprotected final SteppedComboBox createValueListComboBox(java.lang.String propertyId, boolean sortItems)
propertyId
- the propertyIdsortItems
- if true the items are sorted, otherwise the original ordering is preservedjava.lang.IllegalArgumentException
- in case the property is not a value list propertyprotected final SteppedComboBox createValueListComboBox(java.lang.String propertyId, StateObserver enabledState)
propertyId
- the propertyIdenabledState
- a state for controlling the enabled state of the componentjava.lang.IllegalArgumentException
- in case the property is not a value list propertyprotected final SteppedComboBox createValueListComboBox(java.lang.String propertyId, boolean sortItems, StateObserver enabledState)
propertyId
- the propertyIdsortItems
- if true the items are sorted, otherwise the original ordering is preservedenabledState
- a state for controlling the enabled state of the componentjava.lang.IllegalArgumentException
- in case the property is not a value list propertyprotected final SteppedComboBox createValueListComboBox(ValueListProperty property)
property
- the propertyprotected final SteppedComboBox createValueListComboBox(ValueListProperty property, boolean sortItems)
property
- the propertysortItems
- if true the items are sorted, otherwise the original ordering is preservedprotected final SteppedComboBox createValueListComboBox(ValueListProperty property, StateObserver enabledState)
property
- the propertyenabledState
- a state for controlling the enabled state of the componentprotected final SteppedComboBox createValueListComboBox(ValueListProperty property, boolean sortItems, StateObserver enabledState)
property
- the propertysortItems
- if true the items are sorted, otherwise the original ordering is preservedenabledState
- a state for controlling the enabled state of the componentprotected final SteppedComboBox createEditableComboBox(java.lang.String propertyId, javax.swing.ComboBoxModel comboBoxModel)
propertyId
propertyId
- the ID of the property to bindcomboBoxModel
- the ComboBoxModelprotected final SteppedComboBox createEditableComboBox(java.lang.String propertyId, javax.swing.ComboBoxModel comboBoxModel, StateObserver enabledState)
propertyId
propertyId
- the ID of the property to bindcomboBoxModel
- the ComboBoxModelenabledState
- a state for controlling the enabled state of the componentprotected final SteppedComboBox createEditableComboBox(Property property, javax.swing.ComboBoxModel comboBoxModel, StateObserver enabledState)
property
- the property to bindcomboBoxModel
- the ComboBoxModelenabledState
- a state for controlling the enabled state of the componentprotected final SteppedComboBox createPropertyComboBox(java.lang.String propertyId)
propertyId
, the combo box
contains the underlying values of the propertypropertyId
- the ID of the property to bindprotected final SteppedComboBox createPropertyComboBox(java.lang.String propertyId, StateObserver enabledState)
propertyId
, the combo box
contains the underlying values of the propertypropertyId
- the ID of the property to bindenabledState
- a state for controlling the enabled state of the componentprotected final SteppedComboBox createPropertyComboBox(java.lang.String propertyId, StateObserver enabledState, boolean editable)
propertyId
, the combo box
contains the underlying values of the propertypropertyId
- the ID of the property to bindenabledState
- a state for controlling the enabled state of the componenteditable
- true if the combo box should be editable, only works with combo boxes based on String.class propertiesprotected final SteppedComboBox createPropertyComboBox(ColumnProperty property)
property
- the property to bindprotected final SteppedComboBox createPropertyComboBox(ColumnProperty property, StateObserver enabledState)
property
- the property to bindenabledState
- a state for controlling the enabled state of the componentprotected final SteppedComboBox createPropertyComboBox(ColumnProperty property, StateObserver enabledState, boolean editable)
property
- the property to bindenabledState
- a state for controlling the enabled state of the componenteditable
- true if the combo box should be editable, only works with combo boxes based on String.class propertiesprotected final EntityComboBox createForeignKeyComboBox(java.lang.String foreignKeyPropertyId, StateObserver enabledState)
foreignKeyPropertyId
foreignKeyPropertyId
- the ID of the property to bindenabledState
- a state for controlling the enabled state of the componentprotected final EntityComboBox createForeignKeyComboBox(java.lang.String foreignKeyPropertyId)
foreignKeyPropertyId
foreignKeyPropertyId
- the ID of the foreign key property to bind
combination used to create new instances of the entity this EntityComboBox is based on
EntityComboBox is focusableprotected final EntityComboBox createForeignKeyComboBox(ForeignKeyProperty foreignKeyProperty)
foreignKeyProperty
- the foreign key property to bindprotected final EntityComboBox createForeignKeyComboBox(ForeignKeyProperty foreignKeyProperty, StateObserver enabledState)
foreignKeyProperty
- the foreign key property to bind
combination used to create new instances of the entity this EntityComboBox is based on
EntityComboBox is focusableenabledState
- a state for controlling the enabled state of the componentprotected final EntityLookupField createForeignKeyLookupField(java.lang.String foreignKeyPropertyId)
foreignKeypropertyId
, the property
must be an Property.ForeignKeyPropertyforeignKeyPropertyId
- the ID of the foreign key property to bindprotected final EntityLookupField createForeignKeyLookupField(java.lang.String foreignKeyPropertyId, StateObserver enabledState)
foreignKeypropertyId
, the property
must be an Property.ForeignKeyPropertyforeignKeyPropertyId
- the ID of the foreign key property to bindenabledState
- a state for controlling the enabled state of the componentprotected final EntityLookupField createForeignKeyLookupField(ForeignKeyProperty foreignKeyProperty)
foreignKeyProperty
- the foreign key property to bindprotected final EntityLookupField createForeignKeyLookupField(ForeignKeyProperty foreignKeyProperty, StateObserver enabledState)
foreignKeyProperty
- the foreign key property to bindenabledState
- a state for controlling the enabled state of the componentprotected final javax.swing.JTextField createForeignKeyField(java.lang.String propertyId)
propertyId
propertyId
- the ID of the property to bindprotected final javax.swing.JTextField createForeignKeyField(ForeignKeyProperty foreignKeyProperty)
foreignKeyProperty
- the foreign key property to bindprotected final javax.swing.JLabel createLabel(java.lang.String propertyId)
propertyId
propertyId
- the ID of the property from which to retrieve the captionprotected final javax.swing.JLabel createLabel(java.lang.String propertyId, int horizontalAlignment)
propertyId
propertyId
- the ID of the property from which to retrieve the captionhorizontalAlignment
- the horizontal text alignment