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.BaseItem
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dropEvent
(WDropEvent e, DropAction action, int row, int column, WModelIndex parent) Has no effect.int
getColumnCount
(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.int
getRowCount
(WModelIndex parent) Returns the number of rows.boolean
insertColumns
(int column, int count, WModelIndex parent) Always returnsfalse
and 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.boolean
removeColumns
(int column, int count, WModelIndex parent) Always returnsfalse
and has no effect.boolean
setData
(WModelIndex index, Object value, ItemDataRole role) Always returnsfalse
and has no effect.boolean
setHeaderData
(int section, Orientation orientation, Object value, ItemDataRole role) Always returnsfalse
and has no effect.boolean
setItemData
(WModelIndex index, SortedMap<ItemDataRole, Object> values) Always returnsfalse
and has no effect.Methods inherited from class eu.webtoolkit.jwt.WAbstractProxyModel
createSourceIndex, endShiftModelIndexes, fromRawIndex, getAcceptDropMimeTypes, getData, getFlags, getHeaderData, getHeaderFlags, getMimeType, getSourceModel, setSourceModel, startShiftModelIndexes, toRawIndex
Methods 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, sort
Methods 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:
mapFromSource
in classWAbstractProxyModel
- See Also:
-
mapToSource
Maps a proxy model index to the source model.Returns the proxyIndex unmodified.
- Specified by:
mapToSource
in classWAbstractProxyModel
- See Also:
-
getColumnCount
Returns the number of columns.This returns the column count of the source model.
- Specified by:
getColumnCount
in classWAbstractItemModel
- See Also:
-
getRowCount
Returns the number of rows.This returns the row count of the source model.
- Specified by:
getRowCount
in classWAbstractItemModel
- See Also:
-
getParent
Returns the parent for a model index.Returns the parent of the given index in the source model.
- Specified by:
getParent
in classWAbstractItemModel
- See Also:
-
getIndex
Returns the child index for the given row and column.Returns the index in the source model.
- Specified by:
getIndex
in classWAbstractItemModel
- See Also:
-
setData
Always returnsfalse
and has no effect.- Overrides:
setData
in classWAbstractProxyModel
- See Also:
-
setItemData
Always returnsfalse
and has no effect.- Overrides:
setItemData
in classWAbstractProxyModel
- See Also:
-
setHeaderData
Always returnsfalse
and has no effect.- Overrides:
setHeaderData
in classWAbstractItemModel
- See Also:
-
insertColumns
Always returnsfalse
and has no effect.- Overrides:
insertColumns
in classWAbstractProxyModel
- See Also:
-
removeColumns
Always returnsfalse
and has no effect.- Overrides:
removeColumns
in classWAbstractProxyModel
- See Also:
-
dropEvent
Has no effect.- Overrides:
dropEvent
in classWAbstractProxyModel
- See Also:
-