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

## nextapp.echo2.app.table
Class AbstractTableModel

    java.lang.Object
      nextapp.echo2.app.table.AbstractTableModel

All Implemented Interfaces:
  java.io.Serializable, TableModel

Direct Known Subclasses:
  DefaultTableModel

    public abstract class AbstractTableModel

extends java.lang.Object
implements java.io.Serializable, TableModel

An abstract implementation of a `TableModel`. This class provides the following conveniences for `TableModel` implementation development:

- event listener management and notification
- a generic implementation of `getColumnClass()` which returns `Object.class`
- a generic implementation of `getColumnName()` which returns "spreadsheet-style" column names, i.e., A, B, C...Y, Z, AA, AB, AC....

See Also:
  `DefaultTableModel`, Serialized Form

Constructor Summary
`AbstractTableModel()` Default constructor.

Method Summary
`void` | `addTableModelListener(TableModelListener l)` Adds a listener that will be notified of changes/
`void` | `fireTableCellUpdated(int column, int row)` Notifies `TableModelListener`s that the contents of the cell at the specified coordinate were changed.
`void` | `fireTableChanged(TableModelEvent e)` Notifies `TableModelListener`s of the specified event.
`void` | `fireTableDataChanged()` Notifies `TableModelListener`s that the content of the table (possibly including the number of rows) was changed, but that the table's structure has remained intact.
`void` | `fireTableRowsDeleted(int firstRow, int lastRow)` Notifies `TableModelListener`s that rows from `firstRow` to `lastRow` were deleted.
`void` | `fireTableRowsInserted(int firstRow, int lastRow)` Notifies `TableModelListener`s that the rows from `firstRow` to `lastRow` were inserted.
`void` | `fireTableRowsUpdated(int firstRow, int lastRow)` Notifies `TableModelListener`s that the data in the rows from `firstRow` to `lastRow` was updated.
`void` | `fireTableStructureChanged()` Notifies `TableModelListener` that all data in the table may have changed, including the size and structure of the table.
`java.lang.Class` | `getColumnClass(int column)` Returns `Object.class`
`java.lang.String` | `getColumnName(int column)` Returns column names using a "spreadsheet-style" convention, i.e., A, B, C...Y, Z, AA, AB, AC...
`EventListenerList` | `getEventListenerList()` Returns the `EventListenerList` used to register listeners.
`void` | `removeTableModelListener(TableModelListener l)` Removes a listener from being notified of changes.

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

Methods inherited from interface nextapp.echo2.app.table.TableModel
`getColumnCount, getRowCount, getValueAt`

Constructor Detail

### AbstractTableModel

    public AbstractTableModel()

  Default constructor.

Method Detail

### addTableModelListener

    public void addTableModelListener(TableModelListener l)

  Description copied from interface: `TableModel`
  Adds a listener that will be notified of changes/

  Specified by:
    `addTableModelListener` in interface `TableModel`
  Parameters:
    `l` - the listener to add
  See Also:
    `TableModel.addTableModelListener(nextapp.echo2.app.event.TableModelListener)`

### fireTableCellUpdated

    public void fireTableCellUpdated(int column,
                                     int row)

  Notifies `TableModelListener`s that the contents of the cell at the specified coordinate were changed.

  Parameters:
    `column` - the column index
    `row` - the row index

### fireTableDataChanged

    public void fireTableDataChanged()

  Notifies `TableModelListener`s that the content of the table (possibly including the number of rows) was changed, but that the table's structure has remained intact.

### fireTableRowsDeleted

    public void fireTableRowsDeleted(int firstRow,
                                     int lastRow)

  Notifies `TableModelListener`s that rows from `firstRow` to `lastRow` were deleted.

  Parameters:
    `firstRow` - the index of the first deleted row
    `lastRow` - the index of the last deleted row

### fireTableRowsInserted

    public void fireTableRowsInserted(int firstRow,
                                      int lastRow)

  Notifies `TableModelListener`s that the rows from `firstRow` to `lastRow` were inserted.

  Parameters:
    `firstRow` - the index of the first inserted row
    `lastRow` - the index of the last inserted row

### fireTableRowsUpdated

    public void fireTableRowsUpdated(int firstRow,
                                     int lastRow)

  Notifies `TableModelListener`s that the data in the rows from `firstRow` to `lastRow` was updated. in the specified rows was updated.

  Parameters:
    `firstRow` - the index of the first inserted row
    `lastRow` - the index of the last inserted row

### fireTableStructureChanged

    public void fireTableStructureChanged()

  Notifies `TableModelListener` that all data in the table may have changed, including the size and structure of the table.

### fireTableChanged

    public void fireTableChanged(TableModelEvent e)

  Notifies `TableModelListener`s of the specified event.

  Parameters:
    `e` - the event

### getColumnClass

    public java.lang.Class getColumnClass(int column)

  Returns `Object.class`

  Specified by:
    `getColumnClass` in interface `TableModel`
  Parameters:
    `column` - the column index (0-based)
  Returns:
    the most-specific class of object found in the specified column
  See Also:
    `TableModel.getColumnClass(int)`

### getColumnName

    public java.lang.String getColumnName(int column)

  Returns column names using a "spreadsheet-style" convention, i.e., A, B, C...Y, Z, AA, AB, AC...

  Specified by:
    `getColumnName` in interface `TableModel`
  Parameters:
    `column` - the column index (0-based)
  Returns:
    the column name
  See Also:
    `TableModel.getColumnName(int)`

### getEventListenerList

    public EventListenerList getEventListenerList()

  Returns the `EventListenerList` used to register listeners.

  Returns:
    the `EventListenerList`

### removeTableModelListener

    public void removeTableModelListener(TableModelListener l)

  Description copied from interface: `TableModel`
  Removes a listener from being notified of changes.

  Specified by:
    `removeTableModelListener` in interface `TableModel`
  Parameters:
    `l` - the listener to remove
  See Also:
    `TableModel.removeTableModelListener(nextapp.echo2.app.event.TableModelListener)`

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