com.jidesoft.grid
Class DefaultMultiTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
javax.swing.table.DefaultTableModel
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
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 |
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)
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 indexcolumn
- 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 indexcolumn
- 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 indexcolumn
- the column index
- Returns:
- type