org.springframework.richclient.table
Interface MutableTableModel

All Superinterfaces:
TableModel
All Known Implementing Classes:
BaseTableModel, BeanTableListModel, BeanTableModel, ListTableModel

public interface MutableTableModel
extends TableModel

A table model whose contents can change.

Author:
Keith Donald

Method Summary
 void addRow(Object row)
          Adds the given row to the end of the list of existing rows in the table model.
 void addRows(List rows)
          Adds the given rows to the end of the list of existing rows in the table model.
 void clear()
          Removes all rows from the table model.
 void remove(int index)
          Removes from the table model the row at the given position in the list of rows.
 void remove(int[] indexes)
          Removes the rows at each of the given positions.
 void remove(int firstIndex, int lastIndex)
          Removes all of the rows from firstIndex to lastIndex inclusive.
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
 

Method Detail

addRow

void addRow(Object row)
Adds the given row to the end of the list of existing rows in the table model. All registered table model listeners will be notified of the additional row.

Parameters:
row - The row to be added. Must not be null.
Throws:
IllegalArgumentException - if row is null.

addRows

void addRows(List rows)
Adds the given rows to the end of the list of existing rows in the table model. All registered table model listeners will be notified of the additional rows.

Parameters:
rows - The rows to be added. May be empty but must not be null.
Throws:
IllegalArgumentException - if rows is null.

remove

void remove(int index)
Removes from the table model the row at the given position in the list of rows. All registered table model listeners will be notified of the removal of the row.

Parameters:
index - The zero-based position of the row to be removed.
Throws:
IndexOutOfBoundsException - if index is not within the bounds of the model's collection of rows.

remove

void remove(int firstIndex,
            int lastIndex)
Removes all of the rows from firstIndex to lastIndex inclusive. All registered table model listeners will be notified of the removal of the rows.

Parameters:
firstIndex - The zero-based position of the first row to be removed.
lastIndex - The zero-based position of the last row to be removed.
Throws:
IllegalArgumentException - if lastIndex is less than firstIndex.
IndexOutOfBoundsException - if either argument is outside the bounds of the number of rows in the model.

remove

void remove(int[] indexes)
Removes the rows at each of the given positions. All registered table model listeners will be notified of the removal of the rows.

Parameters:
indexes - The array of zero-based indexes of the rows to be removed. May be empty but must not be null.
Throws:
IllegalArgumentException - if indexes is null.
IndexOutOfBoundsException - if any of the elements in the array are not within the bounds of the model's collection of rows.

clear

void clear()
Removes all rows from the table model. All registered table model listeners will be notified of the removal of the rows.



Copyright © 2004-2008 The Spring Framework. All Rights Reserved.