Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.smardec.asc.spantable
Class DefaultSpanTableModel

    java.lang.Object
      |
      +--javax.swing.table.AbstractTableModel
            |
            +--com.smardec.asc.spantable.DefaultSpanTableModel

All Implemented Interfaces:
  java.io.Serializable, javax.swing.table.TableModel

public class DefaultSpanTableModel
extends javax.swing.table.AbstractTableModel

This is an implementation of `TableModel` that uses a `Vector` to store the `TableCell` objects.

Field Summary
`static java.util.Vector` | `EMPTY_VECTOR`

Fields inherited from class javax.swing.table.AbstractTableModel
`listenerList`

Constructor Summary
`DefaultSpanTableModel()` Constructs a `DefaultSpanTableModel` which is a span table of zero columns and zero rows.
`DefaultSpanTableModel(int rowCount, int columnCount)` Constructs a `DefaultSpanTableModel` with `rowCount` and `columnCount` of `null` object values.
`DefaultSpanTableModel(java.lang.Object[] columnNames, int rowCount)` Constructs a `DefaultSpanTableModel` with as many columns as there are elements in `columnNames` and `rowCount` of `null` object values.
`DefaultSpanTableModel(java.util.Vector data, boolean editable, java.util.Vector columnNames)` Constructs a `DefaultSpanTableModel` and initializes the table by passing `data` and `columnNames` to the `setDataVector` method.
`DefaultSpanTableModel(java.util.Vector columnNames, int rowCount)` Constructs a `DefaultSpanTableModel` with as many columns as there are elements in `columnNames` and `rowCount` of `null` object values.
`DefaultSpanTableModel(java.util.Vector data, java.util.Vector columnNames)` Constructs a `DefaultSpanTableModel` and initializes the table by passing `data` and `columnNames` to the `setDataVector` method.

Method Summary
`TableCell` | `getTableCell(int rowIndex, int columnIndex)` Returns table cell at specified row and column.
`protected TableCell` | `getTableCell0(int rowIndex, int columnIndex)` Returns table cell at specified row and column.

Methods inherited from class javax.swing.table.AbstractTableModel
`addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.swing.table.TableModel
`getColumnCount, getRowCount, getValueAt`

Field Detail

### EMPTY_VECTOR

    public static final java.util.Vector EMPTY_VECTOR

Constructor Detail

### DefaultSpanTableModel

    public DefaultSpanTableModel()

  Constructs a `DefaultSpanTableModel` which is a span table of zero columns and zero rows.

### DefaultSpanTableModel

    public DefaultSpanTableModel(int rowCount,
                                 int columnCount)

  Constructs a `DefaultSpanTableModel` with `rowCount` and `columnCount` of `null` object values.

Parameters:
  `rowCount` - the number of rows the span table holds
  `columnCount` - the number of columns the span table holds

### DefaultSpanTableModel

    public DefaultSpanTableModel(java.util.Vector columnNames,
                                 int rowCount)

  Constructs a `DefaultSpanTableModel` with as many columns as there are elements in `columnNames` and `rowCount` of `null` object values. Each column's name will be taken from the `columnNames` vector.

Parameters:
  `columnNames` - `vector` containing the names of the new columns; if this is `null` then the model has no columns
  `rowCount` - the number of rows the table holds

### DefaultSpanTableModel

    public DefaultSpanTableModel(java.lang.Object[] columnNames,
                                 int rowCount)

  Constructs a `DefaultSpanTableModel` with as many columns as there are elements in `columnNames` and `rowCount` of `null` object values. Each column's name will be taken from the `columnNames` array.

Parameters:
  `columnNames` - `array` containing the names of the new columns; if this is `null` then the model has no columns
  `rowCount` - the number of rows the table holds

### DefaultSpanTableModel

    public DefaultSpanTableModel(java.util.Vector data,
                                 java.util.Vector columnNames)

  Constructs a `DefaultSpanTableModel` and initializes the table by passing `data` and `columnNames` to the `setDataVector` method. All data is editable by default.

Parameters:
  `data` - the data of the table
  `columnNames` - `vector` containing the names of the new columns
See Also:
  `DefaultSpanTableModel(java.util.Vector, boolean, java.util.Vector)`

### DefaultSpanTableModel

    public DefaultSpanTableModel(java.util.Vector data,
                                 boolean editable,
                                 java.util.Vector columnNames)

  Constructs a `DefaultSpanTableModel` and initializes the table by passing `data` and `columnNames` to the `setDataVector` method.

Parameters:
  `data` - the data of the table
  `editable` - `true` if table should be editable by default, `false` otherwise
  `columnNames` - `vector` containing the names of the new columns

Method Detail

### getTableCell

    public TableCell getTableCell(int rowIndex,
                                  int columnIndex)

  Returns table cell at specified row and column. Throws IllegalArgumentException if `rowIndex` or `columnIndex` is out of range

  Parameters:
    `rowIndex` - the row whose value is to be queried
    `columnIndex` - the column whose value is to be queried
  Returns:
    table cell at specified row and column.

### getTableCell0

    protected TableCell getTableCell0(int rowIndex,
                                      int columnIndex)

  Returns table cell at specified row and column.
  Note: this method doesn't check bounds.

  Parameters:
    `rowIndex` - the row whose value is to be queried
    `columnIndex` - the column whose value is to be queried
  Returns:
    table cell at specified row and column.

Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2006 Smardec. All Rights Reserved.