JIDE 3.5.15

com.jidesoft.grid
Interface MultiTableModel

All Superinterfaces:
ContextSensitiveTableModel, TableModel
All Known Implementing Classes:
AbstractGroupTableModel, AbstractMultiTableModel, AbstractPageTableModel, AbstractPropertyTableModel, AdvancePageTableModel, AggregateTableModel, BatchedCrudTableModelWrapper, CachedTableModel, CalculatedTableModel, CrudTableModelAdapter, DefaultColumnTableModelWrapper, DefaultGanttTreeTableModel, DefaultGroupTableModel, DefaultMultiTableModel, DefaultPageTableModel, DefaultTableModelWrapper, FilterableAggregateTableModel, FilterableTableModel, FilterableTreeTableModel, HibernatePageTableModel, JoinTableModel, LuceneFilterableTableModel, PropertyTableModel, SortableAggregateTableModel, SortableTableModel, SortableTreeTableModel, TableModelWrapperImpl, TransposeTableModel, TreeTableModel

public interface MultiTableModel
extends ContextSensitiveTableModel

MultiTableModel is a special table model which it can use one table model to represent multiple table models.

There are two ways of using this table model.

First, MultiTableModel Please notes the terms we used. They are a little confusing. ColumnHeader == header row; ColumnFooter == footer row; RowHeader == header column; RowFooter == footer column.

MultiTableModel will make it possible. So in a unified table mode, you can define which columns are headers which will appear at the left side of the table, which columns are footer which will appears at the right side of the table. Once you defined this table model, TableScrollPane will take it and display it correctly.

The header columns and footer columns are not necessarily at the same cluster. They can be anywhere inside the table model. TableScrollPane will find all those special columns and put them at the right place.

See Also:
TableScrollPane

Field Summary
static int FOOTER_COLUMN
           
static int HEADER_COLUMN
           
static int REGULAR_COLUMN
           
 
Method Summary
 int getColumnType(int columnIndex)
          Checks if the column at the columnIndex is a header column or footer column or just regular column.
 int getTableIndex(int columnIndex)
          Gets the table index that this column belongs to.
 
Methods inherited from interface com.jidesoft.grid.ContextSensitiveTableModel
getCellClassAt, getConverterContextAt, getEditorContextAt
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
 

Field Detail

REGULAR_COLUMN

static final int REGULAR_COLUMN
See Also:
Constant Field Values

HEADER_COLUMN

static final int HEADER_COLUMN
See Also:
Constant Field Values

FOOTER_COLUMN

static final int FOOTER_COLUMN
See Also:
Constant Field Values
Method Detail

getColumnType

int getColumnType(int columnIndex)
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.

Parameters:
columnIndex - the column index
Returns:
column type. The possible values are REGULAR_COLUMN, HEADER_COLUMN, or FOOTER_COLUMN.

getTableIndex

int getTableIndex(int columnIndex)
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.

Parameters:
columnIndex - the column index
Returns:
the table index.

JIDE 3.5.15