de.vc.report.sources.swing

## Class SwingTableModel

- java.lang.Object
- - de.vc.report.ReportTableModel
  - - de.vc.report.sources.swing.SwingTableModel

-     public class SwingTableModel
      extends ReportTableModel

  Use a swing table model as an report table model. By default the swing-table column names are the FILLIN-names of the report-table.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SwingTableModel(javax.swing.table.TableModel swingModel)` Creates a report table model from a swing table model.
    `SwingTableModel(javax.swing.table.TableModel swingModel, java.lang.String[] fillinNames)` Creates a report table model from a swing table model and defines or overrides the FILLIN-names for table columns.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String[]` | `definedColumns()` Gets all table columns of this model.
    `protected java.lang.Object` | `doGetValueOfCell(java.lang.String columnName)`
    `protected void` | `doReset()`
    `protected void` | `doSelectNextRow()`
    `javax.swing.table.TableModel` | `getSwingModel()`
    `boolean` | `hasMoreRows()` Determinates if more rows are available.

    - ### Methods inherited from class de.vc.report.ReportTableModel

      `disposeData, doDisposeData, getLogger, getRowIndex, getValueOfCell, reset, selectNextRow`

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

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

- - ### Constructor Detail

    - #### SwingTableModel

          public SwingTableModel(javax.swing.table.TableModel swingModel)

      Creates a report table model from a swing table model. The FILLIN-names of a column are the column-names of the swing table model.
      Parameters:
        `swingModel` - Swing table model.

    - #### SwingTableModel

          public SwingTableModel(javax.swing.table.TableModel swingModel,
                         java.lang.String[] fillinNames)

      Creates a report table model from a swing table model and defines or overrides the FILLIN-names for table columns.
      Parameters:
        `swingModel` - Swing table model.
        `fillinNames` - FILLIN-names of swing table columns.

  - ### Method Detail

    - #### definedColumns

          public java.lang.String[] definedColumns()

      Description copied from class: `ReportTableModel`
      Gets all table columns of this model. Note that two different table models must not have equal column names!
      Specified by:
        `definedColumns` in class `ReportTableModel`
      Returns:
        String[] Name of columns.

    - #### doGetValueOfCell

          protected java.lang.Object doGetValueOfCell(java.lang.String columnName)

      Specified by:
        `doGetValueOfCell` in class `ReportTableModel`

    - #### doReset

          protected void doReset()

      Specified by:
        `doReset` in class `ReportTableModel`

    - #### doSelectNextRow

          protected void doSelectNextRow()

      Specified by:
        `doSelectNextRow` in class `ReportTableModel`

    - #### getSwingModel

          public javax.swing.table.TableModel getSwingModel()

    - #### hasMoreRows

          public boolean hasMoreRows()

      Description copied from class: `ReportTableModel`
      Determinates if more rows are available.
      Specified by:
        `hasMoreRows` in class `ReportTableModel`
      Returns:
        true, if at least one row is available.

© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.