com.antelmann.util.table
Class ObjectTableModelView<T>
java.lang.Object
javax.swing.table.AbstractTableModel
com.antelmann.util.table.TableModelView
com.antelmann.util.table.ObjectTableModelView<T>
- All Implemented Interfaces:
- Refreshable, ObjectTableModel<T>, Wrapped<TableModel>, Serializable, EventListener, TableModelListener, TableModel
public class ObjectTableModelView<T>
- extends TableModelView
- implements ObjectTableModel<T>
combines the features of an ObjectTableModel with a TableModelView
- Since:
- 04.02.2015, 16:12:08
- Author:
- holger
- See Also:
- Serialized Form
|
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 |
refreshContent()
refreshes the embedded content |
void |
setRowValues(Iterable<? extends T> updatedList)
allows to change the underlying table data based on the given collection. |
ObjectTableModel<T> |
unwrap()
returns the embedded instance that this wrapper encloses |
| Methods inherited from class com.antelmann.util.table.TableModelView |
findColumnInBackingModel, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, getVisibleColums, isCellEditable, isColumnVisible, isColumnVisible, setColumnName, setColumnNames, setColumnVisible, setColumnVisible, setValueAt, setVisibleColumns, 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 |
ObjectTableModelView
public ObjectTableModelView(ObjectTableModel<T> model,
int... visibleColumn)
throws ArrayIndexOutOfBoundsException
- Throws:
ArrayIndexOutOfBoundsException
unwrap
public ObjectTableModel<T> unwrap()
- Description copied from interface:
Wrapped
- returns the embedded instance that this wrapper encloses
- Specified by:
unwrap in interface Wrapped<TableModel>- Overrides:
unwrap in class TableModelView
refreshContent
public void refreshContent()
throws IOException
- Description copied from interface:
Refreshable
- refreshes the embedded content
- Specified by:
refreshContent in interface Refreshable
- Throws:
IOException - if the refresh failed
getRowValue
public T getRowValue(int row)
- Description copied from interface:
ObjectTableModel
- 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.
- Specified by:
getRowValue in interface ObjectTableModel<T>
- Returns:
- the Object value representing the given row
getRowFor
public int getRowFor(T entry)
- Description copied from interface:
ObjectTableModel
- locates the row where the given entry can be found in this model
- Specified by:
getRowFor in interface ObjectTableModel<T>
- Returns:
- the row where the entry is found in the model or -1 if the entry doesn't exist in this model
setRowValues
public void setRowValues(Iterable<? extends T> updatedList)
throws UnsupportedOperationException
- Description copied from interface:
ObjectTableModel
- 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.
- Specified by:
setRowValues in interface ObjectTableModel<T>
- 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