com.sibvisions.rad.ui.swing.ext
Class JVxTable.DataBookTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.sibvisions.rad.ui.swing.ext.JVxTable.DataBookTableModel
All Implemented Interfaces:
Serializable, TableModel
Enclosing class:
JVxTable

public static class JVxTable.DataBookTableModel
extends AbstractTableModel

Implements the TableModel interfaces with the given IDataBook.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
JVxTable.DataBookTableModel(JVxTable pTableControl, IDataBook pDataBook)
          Generates the TableModels with the given IDataBook.
 
Method Summary
 Class<?> getColumnClass(int pColumnIndex)
          
 int getColumnCount()
          Gets the column count.
 String getColumnName(int pColumnIndex)
          
 int getRowCount()
          Gets the row count.
 Object getValueAt(int pRowIndex, int pColumnIndex)
          Gets the value from a cell.
 boolean isCellEditable(int pRowIndex, int pColumnIndex)
          
 void setValueAt(Object pValue, int pRowIndex, int pColumnIndex)
          
 
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

JVxTable.DataBookTableModel

public JVxTable.DataBookTableModel(JVxTable pTableControl,
                                   IDataBook pDataBook)
Generates the TableModels with the given IDataBook.

Parameters:
pTableControl - the JVxTable, that uses this model data.
pDataBook - the IDataBook, that provides the data.
Method Detail

getColumnName

public String getColumnName(int pColumnIndex)

Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getColumnClass

public Class<?> getColumnClass(int pColumnIndex)

Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

isCellEditable

public boolean isCellEditable(int pRowIndex,
                              int pColumnIndex)

Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel

setValueAt

public void setValueAt(Object pValue,
                       int pRowIndex,
                       int pColumnIndex)

Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel

getRowCount

public int getRowCount()
Gets the row count. This method considers lazy loading and calculates the row count dependent of the loaded rows.

Returns:
the desired row count or the row count if all rows were fetched

getColumnCount

public int getColumnCount()
Gets the column count.

Returns:
the column count

getValueAt

public Object getValueAt(int pRowIndex,
                         int pColumnIndex)
Gets the value from a cell.

Parameters:
pRowIndex - the row index
pColumnIndex - the column index
Returns:
the value from the cell


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.