public abstract class AbstractRecordDialog<C extends ApplicationContext,R extends DBRecord> extends ToolDialog<C> implements RecordEditor<R>
RecordFieldPanel
for editing a DBRecord
within a form.
Depending on its EditMode
, it contains several according action buttons for clearing, resetting.javax.swing.JDialog.AccessibleJDialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
CENTER, EAST, NORTH, SOUTH, WEST
Constructor and Description |
---|
AbstractRecordDialog(C ctx,
java.awt.Window hook,
RecordCollection recColl,
RecordFieldPanel<C,R> panel) |
Modifier and Type | Method and Description |
---|---|
void |
checkInput() |
void |
checkInput(boolean withPK) |
void |
clear()
Clears the content
|
protected void |
doOnApply()
Should be overridden in order to provide an apply action
|
protected void |
doOnPopup()
This method is called before a dialog is made visible.
|
R |
getCurrentRecord()
Returns the current record being edited.
|
EditMode |
getEditMode() |
RecordFieldPanel<C,R> |
getFieldPanel() |
R |
getMasterRecord()
Returns the master record.
|
ModifyFlag |
getModifyFlag() |
DBRecord |
getParentRecord()
Returns the parent record.
|
RecordCollection |
getRecordCollection()
Returns the underlying RecordCollection on which this editor was popped up.
|
protected boolean |
hasApplyButton()
Defines whether an Apply button should be displayed (default false).
|
protected boolean |
hasCancelButton()
Defines whether a Cancel button should be displayed (default false).
|
boolean |
hasRecordLock()
Tells whether this Editor has a Lock on the current Record
(only used for remote editing)
|
protected boolean |
isClosedOnApply()
Defines whether the dialog should be closed on apply - default is true
|
boolean |
isCreateMode() |
boolean |
isIndexChangeAllowed() |
boolean |
isModified() |
boolean |
isSearchMode() |
boolean |
isUpdateMode() |
void |
lockRecord() |
void |
reset() |
void |
setCurrentRecord(R record)
Sets the current record object for being editable.
|
void |
setModified(boolean state) |
void |
setParentRecord(DBRecord record)
Sets the parent record.
|
void |
unlockRecord() |
addApplyListener, apply, cancel, close, closeByIcon, createButtonPanel, createWindowAdapter, doOnApplyError, doOnCancel, doOnClose, getApplicationContext, getApplier, getApplyAndCloseButton, getApplyButton, getButtonPanel, getCaller, getCancelButton, getClearButton, getCloseButton, getLogChannel, getPreferredWindowAlignment, getWindowAdapter, hasApplyAndCloseButton, hasButtonPanel, hasClearButton, hasCloseButton, isLogDebug, isLogVerbose, locate, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, pack, popup, removeApplyListener, setDefaultButton, setLogChannel, setRelocateOnPopup, wasCancelled
dispose, getMinimumHeight, getMinimumWidth, isDisposeOnClose, isErrorAttachable, isLocated, isPacked, registerSubDialog, repack, setLocation, setLocationRelativeTo, setLocationRelativeTo, setLocationToCenter, setTitle, setVisible, shiftLocation, toDumpString, toDumpString, toString, toString
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocationByPlatform, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLocation, getTitle, isLocated, isVisible, popup, setLocation
apply
getRootPane
getLocation, getMinimumHeight, getMinimumWidth, getSize, getTitle, getToolkit, isPacked, setLocation, setLocationRelativeTo, setMinimumSize, setPreferredSize, shiftLocation
toDumpString, toDumpString, toString, toString
public AbstractRecordDialog(C ctx, java.awt.Window hook, RecordCollection recColl, RecordFieldPanel<C,R> panel)
public boolean hasRecordLock()
RecordEditor
hasRecordLock
in interface RecordEditor<R extends DBRecord>
public void lockRecord()
lockRecord
in interface RecordEditor<R extends DBRecord>
public void unlockRecord()
unlockRecord
in interface RecordEditor<R extends DBRecord>
public void reset()
public boolean isCreateMode()
public boolean isUpdateMode()
public boolean isSearchMode()
public EditMode getEditMode()
protected void doOnPopup() throws java.lang.Exception
ToolDialog
doOnPopup
in class ToolDialog<C extends ApplicationContext>
java.lang.Exception
public RecordCollection getRecordCollection()
DBRecordList
or a DBRecordTable
public ModifyFlag getModifyFlag()
public void setModified(boolean state)
public boolean isModified()
isModified
in interface RecordEditor<R extends DBRecord>
public boolean isIndexChangeAllowed()
isIndexChangeAllowed
in interface RecordEditor<R extends DBRecord>
public void checkInput(boolean withPK) throws java.lang.Exception
java.lang.Exception
public void checkInput() throws java.lang.Exception
java.lang.Exception
public void clear()
Clearable
clear
in interface Clearable
clear
in class ToolDialog<C extends ApplicationContext>
public RecordFieldPanel<C,R> getFieldPanel()
public R getMasterRecord()
RecordEditor
getMasterRecord
in interface RecordEditor<R extends DBRecord>
public void setCurrentRecord(R record)
RecordEditor
setCurrentRecord
in interface RecordEditor<R extends DBRecord>
public R getCurrentRecord()
RecordEditor
getCurrentRecord
in interface RecordEditor<R extends DBRecord>
public void setParentRecord(DBRecord record)
RecordEditor
setParentRecord
in interface RecordEditor<R extends DBRecord>
public DBRecord getParentRecord()
RecordEditor
getParentRecord
in interface RecordEditor<R extends DBRecord>
protected void doOnApply() throws java.lang.Exception
ToolDialog
doOnApply
in class ToolDialog<C extends ApplicationContext>
java.lang.Exception
protected boolean hasApplyButton()
ToolDialog
hasApplyButton
in class ToolDialog<C extends ApplicationContext>
protected boolean hasCancelButton()
ToolDialog
hasCancelButton
in class ToolDialog<C extends ApplicationContext>
protected boolean isClosedOnApply()
ToolDialog
isClosedOnApply
in class ToolDialog<C extends ApplicationContext>
Copyright © 2014 EsprIT-Systems. All Rights Reserved.