|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel com.jidesoft.grid.TableModelWrapperImpl com.jidesoft.grid.DefaultTableModelWrapper
public class DefaultTableModelWrapper
The default implementation of RowTableModelWrapper.
Field Summary | |
---|---|
protected int[] |
_indexes
|
Fields inherited from class com.jidesoft.grid.TableModelWrapperImpl |
---|
_model |
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Fields inherited from interface com.jidesoft.grid.MultiTableModel |
---|
FOOTER_COLUMN, HEADER_COLUMN, REGULAR_COLUMN |
Fields inherited from interface com.jidesoft.grid.EditorStyleTableModel |
---|
EDITOR_STYLE_EDITABLE, EDITOR_STYLE_NORMAL, EDITOR_STYLE_READ_ONLY, EDITOR_STYLE_SELECT_ONLY |
Constructor Summary | |
---|---|
DefaultTableModelWrapper(TableModel model)
Creates a DefaultTableModelWrapper from any table model. |
Method Summary | |
---|---|
protected void |
fireIndexChanged(int eventSerialNumber)
Tells the TableModeWrapper that indexes is changed. |
protected int |
fireIndexChanging()
Tells the TableModeWrapper that indexes is going to be changed. |
int |
getActualRowAt(int row)
Gets the actual row. |
Class<?> |
getCellClassAt(int row,
int column)
Gets the cell class of the underlying table model. |
CellSpan |
getCellSpanAt(int rowIndex,
int columnIndex)
Gets cell span of the underlying table model. |
ConverterContext |
getConverterContextAt(int row,
int column)
Gets the converter context of the underlying table model. |
EditorContext |
getEditorContextAt(int row,
int column)
Gets the editor context of the underlying table model. |
int |
getEditorStyleAt(int rowIndex,
int columnIndex)
Gets editor style at the cell. |
int[] |
getIndexes()
Gets the indexes that maps from the visual row index to the actual row index. |
int |
getRowCount()
|
Object |
getValueAt(int row,
int column)
|
int |
getVisualRowAt(int actualRow)
Gets the visual row. |
boolean |
isCacheEnabled()
Checks if cache is enabled. |
boolean |
isCellEditable(int row,
int column)
|
boolean |
isRowCountChanged()
Checks if underlying table model row count changed. |
protected void |
reallocateIndexes()
Resets the index mapping. |
void |
setCacheEnabled(boolean cacheEnabled)
Enables or disables the cache. |
void |
setIndexes(int[] indexes)
Sets the indexes of the row mapping. |
void |
setValueAt(Object value,
int row,
int column)
|
protected void |
tableCellsUpdated(int column,
int firstRow,
int lastRow)
Called each time the cells in column in the range [firstRow , lastRow ] are
updated. |
protected void |
tableDataChanged()
Called each time all of the data (i.e. |
protected void |
tableDataChanged(CompoundTableModelEvent event)
Called if it receives a table data changed event however the event is an instance of CompoundTableModelEvent . |
protected void |
tableRowsDeleted(int firstRow,
int lastRow)
Called each time one or more contiguous rows are deleted from the underlying TableModel . |
protected void |
tableRowsInserted(int firstRow,
int lastRow)
Called each time one or more contiguous rows are inserted into the underlying TableModel . |
protected void |
tableRowsUpdated(int firstRow,
int lastRow)
Called each time one or more contiguous rows are updated in the underlying TableModel . |
protected void |
tableStructureChanged()
Called each time the structure ( TableColumn s, etc) of the underlying TableModel
changes. |
Methods inherited from class com.jidesoft.grid.TableModelWrapperImpl |
---|
addIndexChangeListener, createCompoundTableModelEvent, fireTableCellsUpdated, fireTableChanged, getActualModel, getCellStyleAt, getColumnClass, getColumnCount, getColumnIdentifier, getColumnName, getColumnType, getIndexChangeListeners, getTableIndex, isCellSpanOn, isCellStyleOn, isNavigableAt, isNavigationOn, removeIndexChangeListener, tableChanged |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, 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 com.jidesoft.grid.TableModelWrapper |
---|
getActualModel |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, removeTableModelListener |
Field Detail |
---|
protected int[] _indexes
Constructor Detail |
---|
public DefaultTableModelWrapper(TableModel model)
model
- the actual table model.Method Detail |
---|
public int getActualRowAt(int row)
getActualRowAt
in interface RowTableModelWrapper
row
- the row on the UI.
public int getVisualRowAt(int actualRow)
getVisualRowAt
in interface RowTableModelWrapper
actualRow
- the actual row in actual model.
public Object getValueAt(int row, int column)
getValueAt
in interface TableModel
getValueAt
in class TableModelWrapperImpl
public void setValueAt(Object value, int row, int column)
setValueAt
in interface TableModel
setValueAt
in class TableModelWrapperImpl
public int getRowCount()
getRowCount
in interface TableModel
getRowCount
in class TableModelWrapperImpl
public boolean isCellEditable(int row, int column)
isCellEditable
in interface TableModel
isCellEditable
in class TableModelWrapperImpl
public ConverterContext getConverterContextAt(int row, int column)
ContextSensitiveTableModel
. If not, it will return null.
getConverterContextAt
in interface ContextSensitiveTableModel
getConverterContextAt
in class TableModelWrapperImpl
row
- the row index.column
- the column index.
public EditorContext getEditorContextAt(int row, int column)
ContextSensitiveTableModel
. If not, it will return null.
getEditorContextAt
in interface ContextSensitiveTableModel
getEditorContextAt
in class TableModelWrapperImpl
row
- the row index.column
- the column index.
public Class<?> getCellClassAt(int row, int column)
ContextSensitiveTableModel
. If not, it will return underlying model's
getColumnClass(column).
getCellClassAt
in interface ContextSensitiveTableModel
getCellClassAt
in class TableModelWrapperImpl
row
- the row index.column
- the column index.
public boolean isRowCountChanged()
protected void reallocateIndexes()
public int[] getIndexes()
getIndexes
in interface IndexedRowTableModelWrapper
public void setIndexes(int[] indexes)
setIndexes
in interface IndexedRowTableModelWrapper
indexes
- the new index array.public boolean isCacheEnabled()
public void setCacheEnabled(boolean cacheEnabled)
cacheEnabled
- true or false.protected int fireIndexChanging()
fireIndexChanging
in class TableModelWrapperImpl
protected void fireIndexChanged(int eventSerialNumber)
fireIndexChanged
in class TableModelWrapperImpl
eventSerialNumber
- the serial number indicating where this method is invoked, to be pair with
fireIndexChangingpublic CellSpan getCellSpanAt(int rowIndex, int columnIndex)
getCellSpanAt
in interface SpanModel
getCellSpanAt
in class TableModelWrapperImpl
rowIndex
- the row indexcolumnIndex
- the column index.
protected void tableRowsInserted(int firstRow, int lastRow)
TableModel
. This
default implementation simply fires a corresponding TableModelEvent
to the listeners on this model.
tableRowsInserted
in class TableModelWrapperImpl
firstRow
- the index of the first row that was insertedlastRow
- the index of the last row that was insertedprotected void tableRowsDeleted(int firstRow, int lastRow)
TableModel
. This
default implementation simply fires a corresponding TableModelEvent
to the listeners on this model.
tableRowsDeleted
in class TableModelWrapperImpl
firstRow
- the index of the first row that was deletedlastRow
- the index of the last row that was deletedprotected void tableRowsUpdated(int firstRow, int lastRow)
TableModel
. simply fires
a corresponding TableModelEvent
to the listeners on this model.
tableRowsUpdated
in class TableModelWrapperImpl
firstRow
- the index of the first row that was updatedlastRow
- the index of the last row that was updatedprotected void tableCellsUpdated(int column, int firstRow, int lastRow)
column
in the range [firstRow
, lastRow
] are
updated. This default implementation simply fires a corresponding TableModelEvent
to the listeners
on this model.
tableCellsUpdated
in class TableModelWrapperImpl
column
- the index of the column that was updatedfirstRow
- the index of the first row in the above column
that was updatedlastRow
- the index of the last row in the above column
that was updatedprotected void tableDataChanged(CompoundTableModelEvent event)
TableModelWrapperImpl
CompoundTableModelEvent
.
tableDataChanged
in class TableModelWrapperImpl
event
- the received CompoundTableModelEventprotected void tableDataChanged()
TableModel
. This
default implementation simply fires a corresponding TableModelEvent
to the listeners on this model.
tableDataChanged
in class TableModelWrapperImpl
protected void tableStructureChanged()
TableColumn
s, etc) of the underlying TableModel
changes. This default implementation simply fires a corresponding TableModelEvent
to the listeners
on this model.
tableStructureChanged
in class TableModelWrapperImpl
public int getEditorStyleAt(int rowIndex, int columnIndex)
EditorStyleTableModel
getEditorStyleAt
in interface EditorStyleTableModel
getEditorStyleAt
in class TableModelWrapperImpl
rowIndex
- the row indexcolumnIndex
- the column index
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |