Holger's
Java API

com.antelmann.sql
Class RowItemTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.antelmann.sql.RowItemTableModel
All Implemented Interfaces:
Serializable, TableModel

public class RowItemTableModel
extends AbstractTableModel

Author:
Holger Antelmann
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
RowItemTableModel(List<RowItem> list)
           
 
Method Summary
 Class<?> getColumnClass(int column)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
 Collection<RowItem> getDirtyRows()
          creates a list of RowItems that are marked dirty
 List<RowItem> getListView()
          creates and returns an unmodifiable view of the embedded list
 RowItem getRowAt(int row)
           
 int getRowCount()
           
 Object getValueAt(int row, int column)
           
 boolean isCellEditable(int row, int column)
           
 boolean isEditable()
           
 void refresh(List<RowItem> list)
          the columns must be properly set on the RowItems
 void setEditable(boolean flag)
           
 void setValueAt(Object value, int row, int column)
           
 
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
 

Constructor Detail

RowItemTableModel

public RowItemTableModel(List<RowItem> list)
Method Detail

refresh

public void refresh(List<RowItem> list)
the columns must be properly set on the RowItems


setEditable

public void setEditable(boolean flag)

isEditable

public boolean isEditable()

getRowAt

public RowItem getRowAt(int row)

getListView

public List<RowItem> getListView()
creates and returns an unmodifiable view of the embedded list


getDirtyRows

public Collection<RowItem> getDirtyRows()
creates a list of RowItems that are marked dirty


getRowCount

public int getRowCount()

getColumnCount

public int getColumnCount()

getColumnName

public String getColumnName(int column)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getColumnClass

public Class<?> getColumnClass(int column)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

getValueAt

public Object getValueAt(int row,
                         int column)

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel

setValueAt

public void setValueAt(Object value,
                       int row,
                       int column)
Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel


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