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
-
public class WReadOnlyProxyModel extends WAbstractProxyModel
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
Constructors Constructor Description WReadOnlyProxyModel()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddropEvent(WDropEvent e, DropAction action, int row, int column, WModelIndex parent)Has no effect.intgetColumnCount(WModelIndex parent)Returns the number of columns.WModelIndexgetIndex(int row, int column, WModelIndex parent)Returns the child index for the given row and column.WModelIndexgetParent(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.WModelIndexmapFromSource(WModelIndex sourceIndex)Maps a source model index to the proxy model.WModelIndexmapToSource(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, java.lang.Object value, ItemDataRole role)Always returnsfalseand has no effect.booleansetHeaderData(int section, Orientation orientation, java.lang.Object value, ItemDataRole role)Always returnsfalseand has no effect.booleansetItemData(WModelIndex index, java.util.SortedMap<ItemDataRole,java.lang.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, 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
-
-
-
-
Method Detail
-
mapFromSource
public WModelIndex mapFromSource(WModelIndex sourceIndex)
Maps a source model index to the proxy model.Returns the sourceIndex unmodified.
- Specified by:
mapFromSourcein classWAbstractProxyModel- See Also:
WAbstractProxyModel.mapToSource(WModelIndex proxyIndex)
-
mapToSource
public WModelIndex mapToSource(WModelIndex proxyIndex)
Maps a proxy model index to the source model.Returns the proxyIndex unmodified.
- Specified by:
mapToSourcein classWAbstractProxyModel- See Also:
WAbstractProxyModel.mapFromSource(WModelIndex sourceIndex)
-
getColumnCount
public int getColumnCount(WModelIndex parent)
Returns the number of columns.This returns the column count of the source model.
- Specified by:
getColumnCountin classWAbstractItemModel- See Also:
WAbstractItemModel.getRowCount(WModelIndex parent)
-
getRowCount
public int getRowCount(WModelIndex parent)
Returns the number of rows.This returns the row count of the source model.
- Specified by:
getRowCountin classWAbstractItemModel- See Also:
WAbstractItemModel.getColumnCount(WModelIndex parent)
-
getParent
public WModelIndex getParent(WModelIndex index)
Returns the parent for a model index.Returns the parent of the given index in the source model.
- Specified by:
getParentin classWAbstractItemModel- See Also:
WAbstractItemModel.getIndex(int row, int column, WModelIndex parent)
-
getIndex
public WModelIndex getIndex(int row, int column, WModelIndex parent)
Returns the child index for the given row and column.Returns the index in the source model.
- Specified by:
getIndexin classWAbstractItemModel- See Also:
WAbstractItemModel.getParent(WModelIndex index)
-
setData
public boolean setData(WModelIndex index, java.lang.Object value, ItemDataRole role)
Always returnsfalseand has no effect.- Overrides:
setDatain classWAbstractProxyModel- See Also:
WAbstractItemModel.getData(WModelIndex index, ItemDataRole role)
-
setItemData
public boolean setItemData(WModelIndex index, java.util.SortedMap<ItemDataRole,java.lang.Object> values)
Always returnsfalseand has no effect.- Overrides:
setItemDatain classWAbstractProxyModel- See Also:
WAbstractItemModel.setData(WModelIndex index, Object value, ItemDataRole role)
-
setHeaderData
public boolean setHeaderData(int section, Orientation orientation, java.lang.Object value, ItemDataRole role)Always returnsfalseand has no effect.- Overrides:
setHeaderDatain classWAbstractItemModel- See Also:
WAbstractItemModel.getHeaderData(int section, Orientation orientation, ItemDataRole role)
-
insertColumns
public boolean insertColumns(int column, int count, WModelIndex parent)Always returnsfalseand has no effect.- Overrides:
insertColumnsin classWAbstractProxyModel- See Also:
WAbstractItemModel.insertRows(int column, int count, WModelIndex parent),WAbstractItemModel.removeColumns(int column, int count, WModelIndex parent),WAbstractItemModel.beginInsertColumns(WModelIndex parent, int first, int last),WAbstractItemModel.endInsertColumns()
-
removeColumns
public boolean removeColumns(int column, int count, WModelIndex parent)Always returnsfalseand has no effect.- Overrides:
removeColumnsin classWAbstractProxyModel- See Also:
WAbstractItemModel.removeRows(int column, int count, WModelIndex parent),WAbstractItemModel.insertColumns(int column, int count, WModelIndex parent),WAbstractItemModel.beginRemoveColumns(WModelIndex parent, int first, int last),WAbstractItemModel.endRemoveColumns()
-
dropEvent
public void dropEvent(WDropEvent e, DropAction action, int row, int column, WModelIndex parent)
Has no effect.- Overrides:
dropEventin classWAbstractProxyModel- See Also:
WAbstractItemModel.getMimeType(),WItemSelectionModel
-
-