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.BaseItemNested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData -
Constructor Summary
Constructors Constructor Description WReadOnlyProxyModel()Constructor.WReadOnlyProxyModel(WObject parent)Constructor. -
Method Summary
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, int role)Always returnsfalseand has no effect.booleansetHeaderData(int section, Orientation orientation, java.lang.Object value, int role)Always returnsfalseand has no effect.booleansetItemData(WModelIndex index, java.util.SortedMap<java.lang.Integer,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, toRawIndexMethods inherited from class eu.webtoolkit.jwt.WAbstractItemModel
beginInsertColumns, beginInsertRows, beginRemoveColumns, beginRemoveRows, collapseColumn, columnsAboutToBeInserted, columnsAboutToBeRemoved, columnsInserted, columnsRemoved, createIndex, createIndex, dataChanged, 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
addChild, getId, getObjectName, remove, setFormData, setObjectName, trMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
WReadOnlyProxyModel
Constructor. -
WReadOnlyProxyModel
public WReadOnlyProxyModel()Constructor.Calls
this((WObject)null)
-
-
Method Details
-
mapFromSource
Maps a source model index to the proxy model.Returns the sourceIndex unmodified.
- Specified by:
mapFromSourcein classWAbstractProxyModel- See Also:
WAbstractProxyModel.mapToSource(WModelIndex proxyIndex)
-
mapToSource
Maps a proxy model index to the source model.Returns the proxyIndex unmodified.
- Specified by:
mapToSourcein classWAbstractProxyModel- See Also:
WAbstractProxyModel.mapFromSource(WModelIndex sourceIndex)
-
getColumnCount
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
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
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
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
Always returnsfalseand has no effect.- Overrides:
setDatain classWAbstractProxyModel- See Also:
WAbstractItemModel.getData(WModelIndex index, int role)
-
setItemData
public boolean setItemData(WModelIndex index, java.util.SortedMap<java.lang.Integer,java.lang.Object> values)Always returnsfalseand has no effect.- Overrides:
setItemDatain classWAbstractProxyModel- See Also:
WAbstractItemModel.setData(WModelIndex index, Object value, int role)
-
setHeaderData
public boolean setHeaderData(int section, Orientation orientation, java.lang.Object value, int role)Always returnsfalseand has no effect.- Overrides:
setHeaderDatain classWAbstractItemModel- See Also:
WAbstractItemModel.getHeaderData(int section, Orientation orientation, int role)
-
insertColumns
Always returnsfalseand has no effect.- Overrides:
insertColumnsin classWAbstractProxyModel- See Also:
WAbstractItemModel.insertRows(int row, int count, WModelIndex parent),WAbstractItemModel.removeColumns(int column, int count, WModelIndex parent),WAbstractItemModel.beginInsertColumns(WModelIndex parent, int first, int last),WAbstractItemModel.endInsertColumns()
-
removeColumns
Always returnsfalseand has no effect.- Overrides:
removeColumnsin classWAbstractProxyModel- See Also:
WAbstractItemModel.removeRows(int row, int count, WModelIndex parent),WAbstractItemModel.insertColumns(int column, int count, WModelIndex parent),WAbstractItemModel.beginRemoveColumns(WModelIndex parent, int first, int last),WAbstractItemModel.endRemoveColumns()
-
dropEvent
Has no effect.- Overrides:
dropEventin classWAbstractProxyModel- See Also:
WAbstractItemModel.getMimeType(),WItemSelectionModel
-