|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
com.jidesoft.grid.JoinTableModel
public class JoinTableModel
JoinTableModel joints several table models horizontally. Although all the table models can have
different row counts, it makes more sense if they have same row counts. JoinTableModel will take care of
the table events fired from those models and translate them to the correct table model event for JoinTableModel. It
supports SpanModel, StyleModel and ContextSensitiveTableModel as well. It supports
MultiTableModel too. The first table model will be the header table model, the second model to be the
main table model and the third table model will be the footer table model. All models after the first three models
will be ignored in this case.
| Field Summary | |
|---|---|
protected List<TableModel> |
_models
|
| 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 | |
|---|---|
JoinTableModel()
Creates an empty JoinTableModel. |
|
JoinTableModel(TableModel[] models)
Creates an JoinTableModel that joins the table models in the array. |
|
| Method Summary | |
|---|---|
void |
addTableModel(TableModel model)
Adds a table model at the end of the JoinTableModel. |
void |
addTableModel(TableModel model,
int index)
Inserts a table model at the specified index of the JoinTableModel. |
TableModel |
getActualModel(int rowIndex,
int columnIndex)
Gets the table model which contains the specific column index. |
Class<?> |
getCellClassAt(int rowIndex,
int columnIndex)
Overrides to return the getCellClassAt from the underlying table models, of course, only when the underlying table model is ContextSensitiveTableModel. |
CellSpan |
getCellSpanAt(int rowIndex,
int columnIndex)
Overrides to return the CellSpan from the underlying table models, of course, only when the underlying table model is SpanModel and isCellSpanOn is true. |
CellStyle |
getCellStyleAt(int rowIndex,
int columnIndex)
Overrides to return the CellStyle from the underlying table models, of course, only when the underlying table model is StyleModel and isCellStyleOn is true. |
Class<?> |
getColumnClass(int columnIndex)
Overrides to return the getColumnClass from the underlying table models. |
int |
getColumnCount()
Gets the total number of column count. |
Object |
getColumnIdentifier(int columnIndex)
Returns the identifier of the column in the model. |
String |
getColumnName(int columnIndex)
Overrides to return the getColumnName from the underlying table models. |
int |
getColumnType(int columnIndex)
Gets the column type in MultiTableModel. |
ConverterContext |
getConverterContextAt(int rowIndex,
int columnIndex)
Overrides to return the getConverterContextAt from the underlying table models, of course, only when the underlying table model is ContextSensitiveTableModel. |
EditorContext |
getEditorContextAt(int rowIndex,
int columnIndex)
Overrides to return the getEditorContextAt from the underlying table models, of course, only when the underlying table model is ContextSensitiveTableModel. |
int |
getRowCount()
Gets the total number of row count. |
int |
getTableIndex(int columnIndex)
Get the table index. |
TableModel |
getTableModel(int index)
Gets the table model at the specific index. |
int |
getTableModelCount()
Gets the number of table models in the JoinTableModel. |
Object |
getValueAt(int rowIndex,
int columnIndex)
Overrides to return the getValueAt from the underlying table models. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Overrides to return the isCellEditable from the underlying table models. |
boolean |
isCellSpanOn()
Overrides to return true if any of the underlying table models is SpanModel and the isCellSpanOn is true. |
boolean |
isCellStyleOn()
Overrides to return true if any of the underlying table models is StyleModel and the isCellStyleOn is true. |
boolean |
isNavigableAt(int rowIndex,
int columnIndex)
Overrides to return true or false depending on the child table models. |
boolean |
isNavigationOn()
Overrides to return true if any of the underlying table models is StyleModel and the isNavigableOn is true. |
void |
removeAllTableModels()
Removes all table models. |
void |
removeTableModel(TableModel model)
Removes a table model from the JoinTableModel. |
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex)
Overrides to call setValueAt of the underlying table models to set the value. |
| 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 |
| Methods inherited from interface javax.swing.table.TableModel |
|---|
addTableModelListener, removeTableModelListener |
| Field Detail |
|---|
protected List<TableModel> _models
| Constructor Detail |
|---|
public JoinTableModel()
JoinTableModel.
public JoinTableModel(TableModel[] models)
JoinTableModel that joins the table models in the array.
models - an array of table models to be joined.| Method Detail |
|---|
public void addTableModel(TableModel model)
JoinTableModel.
model - the model to be added.
public void addTableModel(TableModel model,
int index)
JoinTableModel.
model - the model to be added.index - the index where the model will be inserted.public void removeTableModel(TableModel model)
JoinTableModel.
model - the model to be removed.public void removeAllTableModels()
public int getTableModelCount()
JoinTableModel.
JoinTableModel.public TableModel getTableModel(int index)
addTableModel(javax.swing.table.TableModel,int) is used.
index - the index.
public Object getColumnIdentifier(int columnIndex)
ColumnIdentifierTableModelJideTable uses this method to get the unique
identifier of this column.
getColumnIdentifier in interface ColumnIdentifierTableModelcolumnIndex - the index of the column
public Class<?> getColumnClass(int columnIndex)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelcolumnIndex - the column index.
public String getColumnName(int columnIndex)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelcolumnIndex - the column index.
public final boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelrowIndex - the row index.columnIndex - the column index.
public int getColumnCount()
getColumnCount in interface TableModelpublic int getRowCount()
getRowCount in interface TableModel
public Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface TableModelrowIndex - the row index.columnIndex - the column index.
public void setValueAt(Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelrowIndex - the row index.columnIndex - the column index.aValue - the new value at the specified row and column index.
public TableModel getActualModel(int rowIndex,
int columnIndex)
getActualModel in interface TableModelsWrappercolumnIndex - the column indexrowIndex - the row index.
public ConverterContext getConverterContextAt(int rowIndex,
int columnIndex)
getConverterContextAt in interface ContextSensitiveTableModelrowIndex - the row index.columnIndex - the column index.
public EditorContext getEditorContextAt(int rowIndex,
int columnIndex)
getEditorContextAt in interface ContextSensitiveTableModelrowIndex - the row index.columnIndex - the column index.
public Class<?> getCellClassAt(int rowIndex,
int columnIndex)
getCellClassAt in interface ContextSensitiveTableModelrowIndex - the row index.columnIndex - the column index.
public CellSpan getCellSpanAt(int rowIndex,
int columnIndex)
getCellSpanAt in interface SpanModelrowIndex - the row index.columnIndex - the column index.
public boolean isCellSpanOn()
isCellSpanOn in interface SpanModel
public CellStyle getCellStyleAt(int rowIndex,
int columnIndex)
getCellStyleAt in interface StyleModelrowIndex - the row index.columnIndex - the column index.
public boolean isCellStyleOn()
isCellStyleOn in interface StyleModel
public boolean isNavigableAt(int rowIndex,
int columnIndex)
isNavigableAt in interface NavigableModelrowIndex - the row indexcolumnIndex - the column index
public boolean isNavigationOn()
isNavigationOn in interface NavigableModelpublic int getColumnType(int columnIndex)
getColumnType in interface MultiTableModelcolumnIndex - the column index.
public int getTableIndex(int columnIndex)
getTableIndex in interface MultiTableModelcolumnIndex - the column index.
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||