Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.table
Class ThreadedListTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.sciapp.table.ListTableMap
          extended by com.sciapp.table.ThreadedListTableModel
All Implemented Interfaces:
ReorderListener, ListTableModel, ReorderModel, Serializable, EventListener, TableModelListener, TableModel

public class ThreadedListTableModel
extends ListTableMap

ThreadedListTableModel wraps around a ListTableModel in order to make it thread safe.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sciapp.table.ListTableMap
tableModel
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ThreadedListTableModel(ListTableModel tableModel)
          Create a ThreadedTableModel.
 
Method Summary
 void addRow(Object row)
          Adds a row to the end of the model.
 void addRows(List addedRows)
          Adds a list of rows to the end of the model.

addedRows contains objects representing the actual rows being added. e.g. java.util.Vector, for DefaultTableModel.

 void clear()
          Clears the model of any data.
 void removeRow(int row)
          Removes a row from the data model
 void removeRows(int[] deletedRows)
          Removes a few rows from the data model
 
Methods inherited from class com.sciapp.table.ListTableMap
addReorderListener, convertRowIndexToModel, convertRowIndexToView, fireRowsMapped, fireRowsReordered, getCellValue, getColumnClass, getColumnCount, getColumnName, getInnerModel, getModel, getRowCount, getRows, getValueAt, isCellEditable, removeReorderListener, rowsReordered, setModel, setValueAt, tableChanged
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sciapp.table.ListTableModel
fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, removeTableModelListener
 

Constructor Detail

ThreadedListTableModel

public ThreadedListTableModel(ListTableModel tableModel)
Create a ThreadedTableModel.

Method Detail

addRow

public void addRow(Object row)
Adds a row to the end of the model.

Specified by:
addRow in interface ListTableModel
Overrides:
addRow in class ListTableMap
Parameters:
row - the row being added

addRows

public void addRows(List addedRows)
Adds a list of rows to the end of the model.

addedRows contains objects representing the actual rows being added. e.g. java.util.Vector, for DefaultTableModel.

Specified by:
addRows in interface ListTableModel
Overrides:
addRows in class ListTableMap
Parameters:
addedRows - the rows being added.

clear

public void clear()
Clears the model of any data.

Specified by:
clear in interface ListTableModel
Overrides:
clear in class ListTableMap

removeRow

public void removeRow(int row)
Removes a row from the data model

Specified by:
removeRow in interface ListTableModel
Overrides:
removeRow in class ListTableMap
Parameters:
row - the index of the row being removed

removeRows

public void removeRows(int[] deletedRows)
Removes a few rows from the data model

Specified by:
removeRows in interface ListTableModel
Overrides:
removeRows in class ListTableMap
Parameters:
deletedRows - an integer array that contains indexes of the rows being deleted

Copyright © 2005 Scientific Applications. All Rights Reserved.