Package eu.webtoolkit.jwt
Class WReadOnlyProxyModel
java.lang.Object
eu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WAbstractItemModel
eu.webtoolkit.jwt.WAbstractProxyModel
eu.webtoolkit.jwt.WReadOnlyProxyModel
A read-only wrapper for a source model.
This is a simple proxy model which provides a read-only view on a source model. This is convenient for situations where you want to share a common read-only source model between different sessions.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WAbstractProxyModel
WAbstractProxyModel.BaseItemNested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddropEvent(WDropEvent e, DropAction action, int row, int column, WModelIndex parent) Has no effect.intgetColumnCount(WModelIndex parent) Returns the number of columns.getIndex(int row, int column, WModelIndex parent) Returns the child index for the given row and column.getParent(WModelIndex index) Returns the parent for a model index.intgetRowCount(WModelIndex parent) Returns the number of rows.booleaninsertColumns(int column, int count, WModelIndex parent) Always returnsfalseand has no effect.mapFromSource(WModelIndex sourceIndex) Maps a source model index to the proxy model.mapToSource(WModelIndex proxyIndex) Maps a proxy model index to the source model.booleanremoveColumns(int column, int count, WModelIndex parent) Always returnsfalseand has no effect.booleansetData(WModelIndex index, Object value, ItemDataRole role) Always returnsfalseand has no effect.booleansetHeaderData(int section, Orientation orientation, Object value, ItemDataRole role) Always returnsfalseand has no effect.booleansetItemData(WModelIndex index, SortedMap<ItemDataRole, Object> values) Always returnsfalseand has no effect.Methods inherited from class eu.webtoolkit.jwt.WAbstractProxyModel
createSourceIndex, endShiftModelIndexes, fromRawIndex, getAcceptDropMimeTypes, getData, getFlags, getHeaderData, getHeaderFlags, getMimeType, getSourceModel, setSourceModel, startShiftModelIndexes, toRawIndexMethods inherited from class eu.webtoolkit.jwt.WAbstractItemModel
beginInsertColumns, beginInsertRows, beginRemoveColumns, beginRemoveRows, collapseColumn, columnsAboutToBeInserted, columnsAboutToBeRemoved, columnsInserted, columnsRemoved, copyData, createIndex, createIndex, dataChanged, dropEvent, endInsertColumns, endInsertRows, endRemoveColumns, endRemoveRows, expandColumn, getColumnCount, getData, getData, getData, getData, getHeaderData, getHeaderData, getHeaderFlags, getIndex, getItemData, getRowCount, hasChildren, hasIndex, hasIndex, headerDataChanged, insertColumn, insertColumn, insertColumns, insertRow, insertRow, insertRows, insertRows, layoutAboutToBeChanged, layoutChanged, match, modelReset, removeColumn, removeColumn, removeColumns, removeRow, removeRow, removeRows, removeRows, reset, rowsAboutToBeInserted, rowsAboutToBeRemoved, rowsInserted, rowsRemoved, setData, setData, setData, setData, setHeaderData, setHeaderData, sort, sortMethods inherited from class eu.webtoolkit.jwt.WObject
getId, getObjectName, remove, setFormData, setObjectName, tr
-
Constructor Details
-
WReadOnlyProxyModel
public WReadOnlyProxyModel()Constructor.
-
-
Method Details
-
mapFromSource
Maps a source model index to the proxy model.Returns the sourceIndex unmodified.
- Specified by:
mapFromSourcein classWAbstractProxyModel- See Also:
-
mapToSource
Maps a proxy model index to the source model.Returns the proxyIndex unmodified.
- Specified by:
mapToSourcein classWAbstractProxyModel- See Also:
-
getColumnCount
Returns the number of columns.This returns the column count of the source model.
- Specified by:
getColumnCountin classWAbstractItemModel- See Also:
-
getRowCount
Returns the number of rows.This returns the row count of the source model.
- Specified by:
getRowCountin classWAbstractItemModel- See Also:
-
getParent
Returns the parent for a model index.Returns the parent of the given index in the source model.
- Specified by:
getParentin classWAbstractItemModel- See Also:
-
getIndex
Returns the child index for the given row and column.Returns the index in the source model.
- Specified by:
getIndexin classWAbstractItemModel- See Also:
-
setData
Always returnsfalseand has no effect.- Overrides:
setDatain classWAbstractProxyModel- See Also:
-
setItemData
Always returnsfalseand has no effect.- Overrides:
setItemDatain classWAbstractProxyModel- See Also:
-
setHeaderData
Always returnsfalseand has no effect.- Overrides:
setHeaderDatain classWAbstractItemModel- See Also:
-
insertColumns
Always returnsfalseand has no effect.- Overrides:
insertColumnsin classWAbstractProxyModel- See Also:
-
removeColumns
Always returnsfalseand has no effect.- Overrides:
removeColumnsin classWAbstractProxyModel- See Also:
-
dropEvent
Has no effect.- Overrides:
dropEventin classWAbstractProxyModel- See Also:
-