de.esprit.appsuite.database.dbgui.table

## Class DBRecordTable<C extends ApplicationContext,T extends DBRecord>

- java.lang.Object
- - java.awt.Component
  - - java.awt.Container
    - - javax.swing.JComponent
      - - javax.swing.JTable
        - - de.esprit.common.gui.table.AbstractObjectTable<T>
          - - de.esprit.appsuite.database.dbgui.table.DBRecordTable<C,T>

- All Implemented Interfaces:
    ReorderEvent.Source, RecordCollection<T>, ApplicationObject<C>, Loadable, DataLoadEvent.Source, EnvStorable, Steppable, Clearable, Dumpable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.CellEditorListener, javax.swing.event.ListSelectionListener, javax.swing.event.RowSorterListener, javax.swing.event.TableColumnModelListener, javax.swing.event.TableModelListener, javax.swing.Scrollable
  Direct Known Subclasses:
    ABORecordTable, ClientRecordTable

      public class DBRecordTable<C extends ApplicationContext,T extends DBRecord>
      extends AbstractObjectTable<T>
      implements ApplicationObject<C>, Loadable, RecordCollection<T>, ReorderEvent.Source

  This is a special table that uses a `DBRecordTableModel` in order to store `DBRecord`s. It provides convenience methods to access the table records as `DBRecord` instances.
  Author:
    Rainer Buesch
  See Also:
    `DBRecordTableModel`, Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class javax.swing.JTable

      `javax.swing.JTable.AccessibleJTable, javax.swing.JTable.DropLocation, javax.swing.JTable.PrintMode`

    - ### Nested classes/interfaces inherited from class javax.swing.JComponent

      `javax.swing.JComponent.AccessibleJComponent`

    - ### Nested classes/interfaces inherited from class java.awt.Container

      `java.awt.Container.AccessibleAWTContainer`

    - ### Nested classes/interfaces inherited from class java.awt.Component

      `java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

  - ### Field Summary

    - ### Fields inherited from class javax.swing.JTable

      `AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, gridColor, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, selectionModel, showHorizontalLines, showVerticalLines, tableHeader`

    - ### Fields inherited from class javax.swing.JComponent

      `accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

    - ### Fields inherited from class java.awt.Component

      `BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

    - ### Fields inherited from interface java.awt.image.ImageObserver

      `ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DBRecordTable(DBRecordTableModel<C,T> model)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `addRecord(T newRecord)` Delegates to the DBTableModel.
    `int` | `addRecord(T newRecord, boolean isScrollVisible)`
    `void` | `addReorderListener(ReorderEvent.Listener l)`
    `protected int` | `configurePreferredDumpDialogRows()`
    `protected DBTableCellRenderer` | `createCellRenderer()`
    `protected DBTableHeaderRenderer` | `createHeaderRenderer()`
    `void` | `createNewRecord()` Pops up the `RecordEditor` for creating a new record.
    `protected void` | `deleteRow(int rowIndex)` Overridden to delete the record from the database
    `void` | `editRecord()` Pops up the `RecordEditor` for modifying an existing record.
    `protected void` | `fireOrderChanged(int colnumIndex, boolean sortDir)` Notify all listeners that have registered interest for notification on this event type.
    `de.esprit.appsuite.database.dbgui.table.DBRecordTable.MyClearTableAction` | `getActionClearTable()`
    `de.esprit.appsuite.database.dbgui.table.DBRecordTable.MyNewRecordAction` | `getActionRecordCreate()` Pops up the RecordEditor for entering a new record.
    `de.esprit.appsuite.database.dbgui.table.DBRecordTable.MyDeleteRecordAction` | `getActionRecordDelete()` Removes the record from the database and from the tablemodel.
    `de.esprit.appsuite.database.dbgui.table.DBRecordTable.MyEditRecordAction` | `getActionRecordEdit()` Pops up the RecordEditor for modifying the selected record.
    `de.esprit.appsuite.database.dbgui.table.DBRecordTable.MyRehashRecordAction` | `getActionRecordRehash()`
    `T[]` | `getAllRecords()` Returns all DBRecords contained in the TableModel as an array.
    `C` | `getApplicationContext()`
    `T` | `getMasterRecord()`
    `DBRecordTableModel<C,T>` | `getModel()`
    `DBRecord` | `getParentRecord()`
    `T` | `getRecord(int index)` Delegates to the DBTableModel.
    `T` | `getRecord(java.lang.String dboId)` Delegates to the DBTableModel.
    `T` | `getSelectedRecord()` Returns the DBRecord in column 0 at the currently selected row.
    `T[]` | `getSelectedRecords()` Returns the selected rows as an array of DBRecords.
    `int` | `indexOf(java.lang.String dboId)` Delegates to the DBTableModel.
    `int` | `indexOf(T dbo)` Delegates to the DBTableModel.
    `boolean` | `isEditOnDoubleClick()` Tells whether an edit form is popped up on double click.
    `void` | `load(SqlCondition condition)` Delegates to the DBTableModel.
    `void` | `load(SqlCondition condition, SqlOrder order)` Delegates to the DBTableModel.
    `protected RecordEditor` | `makeRecordCreateDialog(T masterRec)` Returns an instance of `RecordEditor` for creating a record.
    `protected RecordEditor` | `makeRecordEditDialog(T masterRec)` Returns an instance of `RecordEditor` for editing a record.
    `protected RecordTypeChooser` | `makeRecordTypeChooser()`
    `protected void` | `performDeleteRequest(T record, RecordCollection recColl)` Performs a database request in order to delete the given record.
    `protected void` | `performRehashRequest(T record, RecordCollection recColl)` Performs a database request in order to rehash the record.
    `int` | `removeRecord(T dbo)` Delegates to the DBTableModel.
    `int` | `removeRecord(T dbo, boolean isAdjustSelection)`
    `void` | `removeReorderListener(ReorderEvent.Listener l)`
    `void` | `removeSelectedRecord()` Deletes the selected record from the TableModel.
    `boolean` | `replaceRecord(T dbo)` Delegates to the DBTableModel.
    `void` | `search(SqlCondition condition, SqlOrder order)` Delegates to the DBTableModel.
    `T` | `selectRecord(int index)` Selects the record at the given index and scrolls it ti be visible.
    `T` | `selectRecord(java.lang.String dboId)` Selects the record with the given primary key.
    `T` | `selectRecord(T dbo)` Searches the given `DBRecord` in the TableModel and selects it.
    `void` | `setEditOnDoubleClick(boolean editOnDoubleClick)` Enables/disables popping up and edit form on double click.
    `void` | `setParentRecord(DBRecord parentRec)`
    `void` | `setRecord(int index, T dbo)` Sets the record at the given index.

    - ### Methods inherited from class de.esprit.common.gui.table.AbstractObjectTable

      `addActionListener, addDataLoadListener, addEnvProperties, addIndexChangeListener, addListSelectionListener, addObject, addObjects, addObjects, addTableModelListener, adjustSelection, clear, configurePreferredDumpDialogColumns, deleteObject, deleteRow, dropObject, dropObject, dropObject, dumpSelectedObject, first, getActionClearContent, getActionClearSelection, getActionDeleteSelectedRow, getActionDropSelectedRow, getActionDumpTableData, getActionLoadTableData, getActionRowDetails, getAllObjects, getCurrentIndex, getEnvKey, getObject, getPreferredScrollableViewportSize, getRecordCount, getSelectedIndex, getSelectedObject, getSelectedObjects, getSelectionModel, hasRangeSelected, hasSelection, indexOf, initFromEnvStore, isChangeConfirmed, isEmpty, isSelectionEmpty, isSortAscending, last, load, matchesTypedString, next, previous, removeActionListener, removeDataLoadListener, removeIndexChangeListener, removeListSelectionListener, removeTableModelListener, scrollToRow, selectObject, selectObject, selectRow, selectRow, setCurrentIndex, setHeaderRenderer, setObject, setSelectionMode, setSortAscending, toDumpString, toDumpString, toString, toString`

    - ### Methods inherited from class javax.swing.JTable

      `addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellRenderer, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getUpdateSelectionOnSort, getValueAt, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, prepareEditor, prepareRenderer, print, print, print, print, print, processKeyBinding, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, tableChanged, unconfigureEnclosingScrollPane, updateUI, valueChanged`

    - ### Methods inherited from class javax.swing.JComponent

      `addAncestorListener, 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, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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`

    - ### Methods inherited from class java.awt.Container

      `add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, 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`

    - ### Methods 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, 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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface de.esprit.common.gui.comp.Loadable

      `load`

- - ### Constructor Detail

    - #### DBRecordTable

          public DBRecordTable(DBRecordTableModel<C,T> model)

  - ### Method Detail

    - #### getParentRecord

          public DBRecord getParentRecord()

    - #### setParentRecord

          public void setParentRecord(DBRecord parentRec)

    - #### getApplicationContext

          public final C getApplicationContext()

      Specified by:
        `getApplicationContext` in interface `ApplicationObject<C extends ApplicationContext>`

    - #### getModel

          public DBRecordTableModel<C,T> getModel()

      Overrides:
        `getModel` in class `AbstractObjectTable<T extends DBRecord>`

    - #### getMasterRecord

          public T getMasterRecord()

      Specified by:
        `getMasterRecord` in interface `RecordCollection<T extends DBRecord>`

    - #### configurePreferredDumpDialogRows

          protected int configurePreferredDumpDialogRows()

      Overrides:
        `configurePreferredDumpDialogRows` in class `AbstractObjectTable<T extends DBRecord>`

    - #### editRecord

          public void editRecord()

      Pops up the `RecordEditor` for modifying an existing record.
      See Also:
        `getActionRecordEdit()`

    - #### makeRecordEditDialog

          protected RecordEditor makeRecordEditDialog(T masterRec)

      Returns an instance of `RecordEditor` for editing a record. Note that the returned instance is cached automatically, thus this method will be called only once!

    - #### createNewRecord

          public void createNewRecord()

      Pops up the `RecordEditor` for creating a new record.
      See Also:
        `getActionRecordCreate()`

    - #### makeRecordCreateDialog

          protected RecordEditor makeRecordCreateDialog(T masterRec)

      Returns an instance of `RecordEditor` for creating a record. Note that the returned instance is cached automatically, thus this method will be called only once!

    - #### makeRecordTypeChooser

          protected RecordTypeChooser makeRecordTypeChooser()

    - #### createCellRenderer

          protected DBTableCellRenderer createCellRenderer()

    - #### createHeaderRenderer

          protected DBTableHeaderRenderer createHeaderRenderer()

    - #### setRecord

          public void setRecord(int index,
                       T dbo)

      Sets the record at the given index.

    - #### selectRecord

          public T selectRecord(T dbo)

      Searches the given `DBRecord` in the TableModel and selects it. DBRecords are compared with their equals() method.
      Returns:
        true if it could be selected, false if it could not be found.

    - #### selectRecord

          public T selectRecord(int index)

      Selects the record at the given index and scrolls it ti be visible.

    - #### selectRecord

          public T selectRecord(java.lang.String dboId)

      Selects the record with the given primary key. Note that this method only works on records with a single primary key.

    - #### getSelectedRecord

          public T getSelectedRecord()

      Returns the DBRecord in column 0 at the currently selected row. Note that if a range is selected, the current row is the one, that has the lead selection index.
      Specified by:
        `getSelectedRecord` in interface `RecordCollection<T extends DBRecord>`

    - #### getSelectedRecords

          public T[] getSelectedRecords()

      Returns the selected rows as an array of DBRecords.

    - #### getAllRecords

          public T[] getAllRecords()

      Returns all DBRecords contained in the TableModel as an array.

    - #### getRecord

          public T getRecord(int index)

      Delegates to the DBTableModel.
      Specified by:
        `getRecord` in interface `RecordCollection<T extends DBRecord>`
      See Also:
        `DBRecordTableModel.getRecord(int)`

    - #### getRecord

          public T getRecord(java.lang.String dboId)

      Delegates to the DBTableModel.
      See Also:
        `DBRecordTableModel.getRecord(String)`

    - #### indexOf

          public int indexOf(T dbo)

      Delegates to the DBTableModel.
      See Also:
        `DBRecordTableModel.indexOf(DBRecord r)`

    - #### indexOf

          public int indexOf(java.lang.String dboId)

      Delegates to the DBTableModel.
      See Also:
        `DBRecordTableModel.indexOf(String)`

    - #### load

          public void load(SqlCondition condition)
                    throws java.lang.Exception

      Delegates to the DBTableModel.
      Throws:
        `java.lang.Exception`
      See Also:
        `DBRecordTableModel.load(SqlCondition)`

    - #### load

          public void load(SqlCondition condition,
                  SqlOrder order)
                    throws java.lang.Exception

      Delegates to the DBTableModel.
      Throws:
        `java.lang.Exception`
      See Also:
        `DBRecordTableModel.load(SqlCondition, SqlOrder)`

    - #### search

          public void search(SqlCondition condition,
                    SqlOrder order)
                      throws java.lang.Exception

      Delegates to the DBTableModel.
      Throws:
        `java.lang.Exception`
      See Also:
        `DBRecordTableModel.search(SqlCondition, SqlOrder)`

    - #### replaceRecord

          public boolean replaceRecord(T dbo)

      Delegates to the DBTableModel.
      Specified by:
        `replaceRecord` in interface `RecordCollection<T extends DBRecord>`
      See Also:
        `DBRecordTableModel.replaceRecord(DBRecord)`

    - #### removeSelectedRecord

          public void removeSelectedRecord()

      Deletes the selected record from the TableModel.

    - #### removeRecord

          public int removeRecord(T dbo)

      Delegates to the DBTableModel.
      Specified by:
        `removeRecord` in interface `RecordCollection<T extends DBRecord>`
      See Also:
        `DBRecordTableModel.removeRecord(DBRecord)`

    - #### removeRecord

          public int removeRecord(T dbo,
                         boolean isAdjustSelection)

      Specified by:
        `removeRecord` in interface `RecordCollection<T extends DBRecord>`

    - #### addRecord

          public int addRecord(T newRecord)

      Delegates to the DBTableModel.
      Specified by:
        `addRecord` in interface `RecordCollection<T extends DBRecord>`
      Returns:
        the index where the record was inserted, or -1 if insert failed

    - #### addRecord

          public int addRecord(T newRecord,
                      boolean isScrollVisible)

      Specified by:
        `addRecord` in interface `RecordCollection<T extends DBRecord>`

    - #### addReorderListener

          public void addReorderListener(ReorderEvent.Listener l)

      Specified by:
        `addReorderListener` in interface `ReorderEvent.Source`

    - #### removeReorderListener

          public void removeReorderListener(ReorderEvent.Listener l)

      Specified by:
        `removeReorderListener` in interface `ReorderEvent.Source`

    - #### fireOrderChanged

          protected void fireOrderChanged(int colnumIndex,
                              boolean sortDir)

      Notify all listeners that have registered interest for notification on this event type.

    - #### performRehashRequest

          protected void performRehashRequest(T record,
                                  RecordCollection recColl)
                                       throws java.lang.Exception

      Performs a database request in order to rehash the record. If successful the record is replaced in the underlying RecordCollection.
      Throws:
        `java.lang.Exception`

    - #### performDeleteRequest

          protected void performDeleteRequest(T record,
                                  RecordCollection recColl)
                                       throws java.lang.Exception

      Performs a database request in order to delete the given record. If successful the record is also deleted from the underlying RecordCollection.
      Throws:
        `java.lang.Exception`

    - #### getActionRecordCreate

          public de.esprit.appsuite.database.dbgui.table.DBRecordTable.MyNewRecordAction getActionRecordCreate()

      Pops up the RecordEditor for entering a new record.

    - #### getActionRecordEdit

          public de.esprit.appsuite.database.dbgui.table.DBRecordTable.MyEditRecordAction getActionRecordEdit()

      Pops up the RecordEditor for modifying the selected record.

    - #### getActionRecordDelete

          public de.esprit.appsuite.database.dbgui.table.DBRecordTable.MyDeleteRecordAction getActionRecordDelete()

      Removes the record from the database and from the tablemodel.

    - #### getActionRecordRehash

          public de.esprit.appsuite.database.dbgui.table.DBRecordTable.MyRehashRecordAction getActionRecordRehash()

    - #### getActionClearTable

          public de.esprit.appsuite.database.dbgui.table.DBRecordTable.MyClearTableAction getActionClearTable()

    - #### isEditOnDoubleClick

          public boolean isEditOnDoubleClick()

      Tells whether an edit form is popped up on double click. If set to false, an DumpDialog is popped up instead of an edit form.

    - #### setEditOnDoubleClick

          public void setEditOnDoubleClick(boolean editOnDoubleClick)

      Enables/disables popping up and edit form on double click. The default is true.

    - #### deleteRow

          protected void deleteRow(int rowIndex)
                            throws java.lang.Exception

      Overridden to delete the record from the database
      Overrides:
        `deleteRow` in class `AbstractObjectTable<T extends DBRecord>`
      Throws:
        `java.lang.Exception`
      See Also:
        `AbstractObjectTable.dropObject(int)`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.