JIDE 3.5.15

com.jidesoft.grid
Class DefaultMultiTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by javax.swing.table.DefaultTableModel
          extended by com.jidesoft.grid.DefaultMultiTableModel
All Implemented Interfaces:
ContextSensitiveTableModel, MultiTableModel, Serializable, TableModel

public class DefaultMultiTableModel
extends DefaultTableModel
implements MultiTableModel

Default implementation of MultiTableModel based on DefaultTableModel.

By default none of the columns are header or footer. The table index returned from getTableIndex() is always 0.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Fields inherited from interface com.jidesoft.grid.MultiTableModel
FOOTER_COLUMN, HEADER_COLUMN, REGULAR_COLUMN
 
Constructor Summary
DefaultMultiTableModel()
           
DefaultMultiTableModel(int rowCount, int columnCount)
           
DefaultMultiTableModel(Object[][] data, Object[] columnNames)
           
DefaultMultiTableModel(Object[] columnNames, int rowCount)
           
DefaultMultiTableModel(Vector columnNames, int rowCount)
           
DefaultMultiTableModel(Vector data, Vector columnNames)
           
 
Method Summary
 Class getCellClassAt(int row, int column)
          Gets the type at cell (row, column).
 int getColumnType(int column)
          Checks if the column at the columnIndex is a header column or footer column or just regular column.
 ConverterContext getConverterContextAt(int row, int column)
          Gets the converter context at cell (row, column).
 EditorContext getEditorContextAt(int row, int column)
          Gets the editor context at cell (row, column).
 int getTableIndex(int columnIndex)
          Gets the table index that this column belongs to.
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, isCellEditable, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
 

Constructor Detail

DefaultMultiTableModel

public DefaultMultiTableModel()

DefaultMultiTableModel

public DefaultMultiTableModel(int rowCount,
                              int columnCount)

DefaultMultiTableModel

public DefaultMultiTableModel(Vector columnNames,
                              int rowCount)

DefaultMultiTableModel

public DefaultMultiTableModel(Object[] columnNames,
                              int rowCount)

DefaultMultiTableModel

public DefaultMultiTableModel(Vector data,
                              Vector columnNames)

DefaultMultiTableModel

public DefaultMultiTableModel(Object[][] data,
                              Object[] columnNames)
Method Detail

getColumnType

public int getColumnType(int column)
Description copied from interface: MultiTableModel
Checks if the column at the columnIndex is a header column or footer column or just regular column. Header columns will be displayed at the left side of the table. Footer columns will be on the right side. Regular columns will in the middle and will have horizontal scroll bar if there are a lot of columns.

Specified by:
getColumnType in interface MultiTableModel
Parameters:
column - the column index
Returns:
column type. The possible values are REGULAR_COLUMN, HEADER_COLUMN, or FOOTER_COLUMN.

getTableIndex

public int getTableIndex(int columnIndex)
Description copied from interface: MultiTableModel
Gets the table index that this column belongs to. As convention, the table index starts from 0. So all columns that return 0 in this method will be grouped into the first table. Those return 1 will be on the second table, and so on.

Specified by:
getTableIndex in interface MultiTableModel
Parameters:
columnIndex - the column index
Returns:
the table index.

getConverterContextAt

public ConverterContext getConverterContextAt(int row,
                                              int column)
Description copied from interface: ContextSensitiveTableModel
Gets the converter context at cell (row, column).

For a special row index like -1, please return the default converter context for the entire column if there is any.

Specified by:
getConverterContextAt in interface ContextSensitiveTableModel
Parameters:
row - the row index
column - the column index
Returns:
converter context

getEditorContextAt

public EditorContext getEditorContextAt(int row,
                                        int column)
Description copied from interface: ContextSensitiveTableModel
Gets the editor context at cell (row, column).

For a special row index like -1, please return the default editor context for the entire column if there is any.

Specified by:
getEditorContextAt in interface ContextSensitiveTableModel
Parameters:
row - the row index
column - the column index
Returns:
editor context

getCellClassAt

public Class getCellClassAt(int row,
                            int column)
Description copied from interface: ContextSensitiveTableModel
Gets the type at cell (row, column).

For a special row index like -1, please return the default column class for the entire column if there is any.

Specified by:
getCellClassAt in interface ContextSensitiveTableModel
Parameters:
row - the row index
column - the column index
Returns:
type

JIDE 3.5.15