net.sf.statcvs.reportmodel

## Class Table

- java.lang.Object
- - net.sf.statcvs.reportmodel.Table

-     public class Table
      extends java.lang.Object

  Represents a data table for a report. Columns may be added to the table. Values can be added to the columns. Finally, the table can be rendered as HTML.
  Version:
    $Id: Table.java,v 1.2 2008/04/02 11:22:14 benoitx Exp $
  Author:
    Richard Cyganiak

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Table(java.lang.String summary)` Creates a new table model

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addColumn(Column column)` Adds a column to the table
    `java.util.Iterator` | `getColumnIterator()` Returns an iterator of all `Column` objects of the table
    `int` | `getRowCount()` Returns the number of data rows in the table.
    `java.lang.String` | `getSummary()` Returns the summary text of the table.
    `boolean` | `hasKeysInFirstColumn()` Returns if the first column contains keys that identify each row
    `void` | `setKeysInFirstColumn(boolean enabled)` set if the first column contains keys that identify each row
    `void` | `setShowTotals(boolean enabled)` set if totals of each column should be shown
    `boolean` | `showTotals()` Returns if totals of each column should be shown

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

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

- - ### Constructor Detail

    - #### Table

          public Table(java.lang.String summary)

      Creates a new table model
      Parameters:
        `summary` - a short summary of the table data, intended for non-visual web browsers

  - ### Method Detail

    - #### setKeysInFirstColumn

          public void setKeysInFirstColumn(boolean enabled)

      set if the first column contains keys that identify each row
      Parameters:
        `enabled` - `true` if first column contains keys

    - #### hasKeysInFirstColumn

          public boolean hasKeysInFirstColumn()

      Returns if the first column contains keys that identify each row
      Returns:
        `true` if first column contains keys

    - #### setShowTotals

          public void setShowTotals(boolean enabled)

      set if totals of each column should be shown
      Parameters:
        `enabled` - `true` if totals should be shown

    - #### showTotals

          public boolean showTotals()

      Returns if totals of each column should be shown
      Returns:
        `true` if so

    - #### getSummary

          public java.lang.String getSummary()

      Returns the summary text of the table. This is intended for non-visual web browsers.
      Returns:
        the table summary

    - #### getRowCount

          public int getRowCount()

      Returns the number of data rows in the table.
      Returns:
        number of data rows in the table

    - #### addColumn

          public void addColumn(Column column)

      Adds a column to the table
      Parameters:
        `column` - the column

    - #### getColumnIterator

          public java.util.Iterator getColumnIterator()

      Returns an iterator of all `Column` objects of the table
      Returns:
        an iterator of Columns