com.antelmann.util.table
Class TableModelView
java.lang.Object
com.antelmann.util.table.TableModelView
- All Implemented Interfaces:
- TableModel
public class TableModelView
- extends Object
- implements TableModel
provides a view of a given TableModel.
Note that this implementation is not synchronized.
- Author:
- Holger Antelmann
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TableModelView
public TableModelView(TableModel model,
int... visibleColumn)
throws ArrayIndexOutOfBoundsException
- Throws:
ArrayIndexOutOfBoundsException
getBackingModel
public TableModel getBackingModel()
findColumnInBackingModel
public int findColumnInBackingModel(String columnName)
isVisibleColumn
public boolean isVisibleColumn(String columnName)
getVisibleColums
public List<Integer> getVisibleColums()
isVisibleColumn
public boolean isVisibleColumn(int c)
setColumnVisible
public void setColumnVisible(int column,
boolean flag)
throws ArrayIndexOutOfBoundsException
- Note: listeners to the model will ONLY be notified if the backing model is an
instance of an AbstractTableModel, otherwise NOT!
- Throws:
ArrayIndexOutOfBoundsException
getRowCount
public int getRowCount()
- Specified by:
getRowCount in interface TableModel
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount in interface TableModel
getColumnName
public String getColumnName(int column)
- Specified by:
getColumnName in interface TableModel
getColumnClass
public Class<?> getColumnClass(int column)
- Specified by:
getColumnClass in interface TableModel
isCellEditable
public boolean isCellEditable(int row,
int column)
- Specified by:
isCellEditable in interface TableModel
getValueAt
public Object getValueAt(int row,
int column)
- Specified by:
getValueAt in interface TableModel
setValueAt
public void setValueAt(Object value,
int row,
int column)
- Specified by:
setValueAt in interface TableModel
addTableModelListener
public void addTableModelListener(TableModelListener listener)
- Specified by:
addTableModelListener in interface TableModel
removeTableModelListener
public void removeTableModelListener(TableModelListener listener)
- Specified by:
removeTableModelListener in interface TableModel
(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads