Class WAbstractTableModel
- Direct Known Subclasses:
WEnumModel
An abstract table model specializes WAbstractItemModel for two-dimensional tables (but
no hierarchical models).
It cannot be used directly but must be subclassed. Subclassed models must at least reimplement
WAbstractItemModel#getColumnCount(), WAbstractItemModel#getRowCount() and WAbstractItemModel#getData().
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetIndex(int row, int column, WModelIndex index) Returns the child index for the given row and column.getParent(WModelIndex parent) Returns the parent for a model index.Methods inherited from class eu.webtoolkit.jwt.WAbstractItemModel
beginInsertColumns, beginInsertRows, beginRemoveColumns, beginRemoveRows, collapseColumn, columnsAboutToBeInserted, columnsAboutToBeRemoved, columnsInserted, columnsRemoved, copyData, createIndex, createIndex, dataChanged, dropEvent, dropEvent, endInsertColumns, endInsertRows, endRemoveColumns, endRemoveRows, expandColumn, fromRawIndex, getAcceptDropMimeTypes, getColumnCount, getColumnCount, getData, getData, getData, getData, getData, getFlags, getHeaderData, getHeaderData, getHeaderData, getHeaderFlags, getHeaderFlags, getIndex, getItemData, getMimeType, getRowCount, getRowCount, hasChildren, hasIndex, hasIndex, headerDataChanged, insertColumn, insertColumn, insertColumns, insertColumns, insertRow, insertRow, insertRows, insertRows, layoutAboutToBeChanged, layoutChanged, match, modelReset, removeColumn, removeColumn, removeColumns, removeColumns, removeRow, removeRow, removeRows, removeRows, reset, rowsAboutToBeInserted, rowsAboutToBeRemoved, rowsInserted, rowsRemoved, setData, setData, setData, setData, setData, setHeaderData, setHeaderData, setHeaderData, setItemData, sort, sort, toRawIndexMethods inherited from class eu.webtoolkit.jwt.WObject
getId, getObjectName, remove, setFormData, setObjectName, tr
-
Constructor Details
-
WAbstractTableModel
public WAbstractTableModel()Creates a new abstract list model.
-
-
Method Details
-
getParent
Description copied from class:WAbstractItemModelReturns the parent for a model index.An implementation should use
createIndex()to create a model index that corresponds to the parent of a given index.Note that the index itself may be stale (referencing a row/column within the parent that is outside the model geometry), but its parent (identified by the
WModelIndex.getInternalPointer()) is referencing an existing parent. A stale index can only be used while the model geometry is being updated, i.e. during the emission of the corresponding [rows/columns](Being)[Removed/Inserted]() signals.- Specified by:
getParentin classWAbstractItemModel- See Also:
-
getIndex
Description copied from class:WAbstractItemModelReturns the child index for the given row and column.When implementing this method, you can use
createIndex()to create an index that corresponds to the item atrowandcolumnwithinparent.If the location is invalid (out of bounds at the parent), then an invalid index must be returned.
- Specified by:
getIndexin classWAbstractItemModel- See Also:
-