Holger's
Java API

com.antelmann.util.table
Interface ObjectTableModel<T>

All Superinterfaces:
Refreshable, TableModel
All Known Implementing Classes:
AbstractObjectTableModel, ConvertedObjectTableModel, EmailTableModel, LicenseTableModel, MessageTableModel, MethodTableModel, ObjectTableModelView, ObjectTableModelWrapper, PatternTableModel, PropertyEntryTableModel, ResultSetTableModel, SelectableObjectsTableModel, StoreUpdateTableModel

public interface ObjectTableModel<T>
extends TableModel, Refreshable

an ObjectTableModel is a TableModel where any given row represents a certain Object value. Refreshable is used to tell the model that the underlying elements have changed; this is typically implemented by simply calling AbstractTableModel.fireTableRowsUpdated(int, int)

Since:
6. Juni 2007, 13:11
Author:
Holger Antelmann

Method Summary
 int getRowFor(T entry)
          locates the row where the given entry can be found in this model
 T getRowValue(int row)
          retrieves the value that is represented by the given row in this model.
 void setRowValues(Iterable<? extends T> updatedList)
          allows to change the underlying table data based on the given collection.
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from interface com.antelmann.util.Refreshable
refreshContent
 

Method Detail

getRowValue

T getRowValue(int row)
retrieves the value that is represented by the given row in this model. If the given row does not exist in the model, various RuntimeExceptions may occur.

Returns:
the Object value representing the given row

getRowFor

int getRowFor(T entry)
locates the row where the given entry can be found in this model

Returns:
the row where the entry is found in the model or -1 if the entry doesn't exist in this model

setRowValues

void setRowValues(Iterable<? extends T> updatedList)
                  throws UnsupportedOperationException
allows to change the underlying table data based on the given collection. Unless specified otherwise, the given collection remains untouched and the elements are copied into the internal data structure of the model.

Throws:
UnsupportedOperationException - if this model doesn't allow such changes


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads