public class DBRecordList<C extends ApplicationContext> extends ZList implements RecordCollection, ApplicationObject<C>
DBRecord
objects and therefore uses a DBRecordListModel
.
It provides convenience methods to access the list records as DBRecord
.javax.swing.JList.AccessibleJList, javax.swing.JList.DropLocation
javax.swing.JComponent.AccessibleJComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
DBRecordList(C ctx,
DBRecord master) |
DBRecordList(C ctx,
DBRecord[] masters) |
DBRecordList(DBRecordListModel<C> model) |
Modifier and Type | Method and Description |
---|---|
int |
addRecord(DBRecord record) |
int |
addRecord(DBRecord record,
boolean isScrollVisible) |
void |
createNewRecord() |
void |
dumpSelectedObject()
Pops up the TableRowDumpDialog for displaying record details.
|
void |
editRecord()
Pops up the RecordEditor for modifying an existing record.
|
ZAction |
getActionRecordCreate() |
ZAction |
getActionRecordDelete() |
de.esprit.appsuite.database.dbgui.list.DBRecordList.MyRecordDetailsAction |
getActionRecordDetails()
Pops up a TableRowDumpDialog showing the details of the selected record.
|
ZAction |
getActionRecordEdit() |
ZAction |
getActionRecordRehash() |
ZAction |
getActionReload() |
C |
getApplicationContext() |
DBRecord |
getMasterRecord() |
DBRecord[] |
getMasterRecords() |
DBRecordListModel<C> |
getModel() |
DBRecord |
getRecord(int i) |
int |
getRecordCount() |
DBRecord |
getSelectedRecord() |
DBRecord |
getSelectedValue() |
int |
indexOf(java.lang.String recordId) |
boolean |
isEditOnDoubleClick()
Tells whether an edit form is popped up on double click.
|
void |
load() |
void |
load(SqlCondition condition) |
void |
load(SqlCondition condition,
SqlOrder order) |
protected RecordEditor |
makeRecordCreateDialog(DBRecord newType) |
protected RecordEditor |
makeRecordEditDialog(DBRecord selRec) |
protected RecordTypeChooser |
makeRecordTypeChooser() |
protected void |
performDeleteRequest(DBRecord record,
RecordCollection recColl)
Performs a database request in order to delete the given record.
|
protected void |
performRehashRequest(DBRecord record,
RecordCollection recColl)
Performs a database request in order to rehash the record.
|
int |
removeRecord(DBRecord record) |
int |
removeRecord(DBRecord record,
boolean isAdjustSelection) |
boolean |
replaceRecord(DBRecord record) |
void |
setEditOnDoubleClick(boolean editOnDoubleClick)
Enables/disables popping up and edit form on double click.
|
addAllItems, addAllItems, addIndexChangeListener, addItem, addItem, addListDataListener, adjustSelection, clear, contains, createSelectionModel, doOnDoubleClick, first, getActionClear, getActionDelete, getActionMoveDown, getActionMoveUp, getAllItems, getComparator, getCurrentIndex, getFirstItem, getItem, getItemCount, getLastItem, getModifyFlag, getSelectedItem, getSelectedItems, getSelectionModel, hasMultipleSelection, hasSingleSelection, indexOf, isChangeConfirmed, isEmpty, isLocked, isModified, isNumb, isSortAscending, last, loadFrom, loadFrom, matchesTypedString, next, previous, removeIndexChangeListener, removeItem, removeItem, removeItem, removeItem, removeListDataListener, removeSelectedItem, replaceItem, replaceOrAddItem, scrollToRow, selectAllItems, selectItem, selectItem, selectItems, selectItems, setComparator, setCurrentIndex, setDoubleClickAction, setItem, setLocked, setModified, setModifyFlag, setNumb, setSelectedIndex, setSelectionMode, setSortAscending
addListSelectionListener, addSelectionInterval, clearSelection, ensureIndexIsVisible, fireSelectionValueChanged, getAccessibleContext, getAnchorSelectionIndex, getCellBounds, getCellRenderer, getDragEnabled, getDropLocation, getDropMode, getFirstVisibleIndex, getFixedCellHeight, getFixedCellWidth, getLastVisibleIndex, getLayoutOrientation, getLeadSelectionIndex, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getNextMatch, getPreferredScrollableViewportSize, getPrototypeCellValue, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedIndex, getSelectedIndices, getSelectedValues, getSelectedValuesList, getSelectionBackground, getSelectionForeground, getSelectionMode, getToolTipText, getUI, getUIClassID, getValueIsAdjusting, getVisibleRowCount, indexToLocation, isSelectedIndex, isSelectionEmpty, locationToIndex, paramString, removeListSelectionListener, removeSelectionInterval, setCellRenderer, setDragEnabled, setDropMode, setFixedCellHeight, setFixedCellWidth, setLayoutOrientation, setListData, setListData, setModel, setPrototypeCellValue, setSelectedIndices, setSelectedValue, setSelectionBackground, setSelectionForeground, setSelectionInterval, setSelectionMode, setSelectionModel, setUI, setValueIsAdjusting, setVisibleRowCount, 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, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public DBRecordList(DBRecordListModel<C> model)
public final C getApplicationContext()
getApplicationContext
in interface ApplicationObject<C extends ApplicationContext>
public DBRecord getSelectedValue()
getSelectedValue
in class javax.swing.JList
public void dumpSelectedObject()
public boolean isEditOnDoubleClick()
public void setEditOnDoubleClick(boolean editOnDoubleClick)
public DBRecord getMasterRecord()
getMasterRecord
in interface RecordCollection
public DBRecord[] getMasterRecords()
public void createNewRecord()
public void editRecord()
getActionRecordEdit()
protected RecordTypeChooser makeRecordTypeChooser()
protected RecordEditor makeRecordCreateDialog(DBRecord newType)
protected RecordEditor makeRecordEditDialog(DBRecord selRec)
public DBRecordListModel<C> getModel()
public int addRecord(DBRecord record)
addRecord
in interface RecordCollection
public int addRecord(DBRecord record, boolean isScrollVisible)
addRecord
in interface RecordCollection
public boolean replaceRecord(DBRecord record)
replaceRecord
in interface RecordCollection
public int removeRecord(DBRecord record)
removeRecord
in interface RecordCollection
public int removeRecord(DBRecord record, boolean isAdjustSelection)
removeRecord
in interface RecordCollection
public DBRecord getSelectedRecord()
getSelectedRecord
in interface RecordCollection
public DBRecord getRecord(int i)
getRecord
in interface RecordCollection
public int getRecordCount()
getRecordCount
in interface Steppable
getRecordCount
in class ZList
public void load() throws java.lang.Exception
public void load(SqlCondition condition) throws java.lang.Exception
java.lang.Exception
public void load(SqlCondition condition, SqlOrder order) throws java.lang.Exception
java.lang.Exception
public int indexOf(java.lang.String recordId)
protected void performRehashRequest(DBRecord record, RecordCollection recColl) throws java.lang.Exception
java.lang.Exception
protected void performDeleteRequest(DBRecord record, RecordCollection recColl) throws java.lang.Exception
java.lang.Exception
public ZAction getActionReload()
public ZAction getActionRecordCreate()
public ZAction getActionRecordDelete()
public ZAction getActionRecordRehash()
public ZAction getActionRecordEdit()
public de.esprit.appsuite.database.dbgui.list.DBRecordList.MyRecordDetailsAction getActionRecordDetails()
Copyright © 2014 EsprIT-Systems. All Rights Reserved.