Interface IRowGroupModel<T>
- All Superinterfaces:
IPersistable
- All Known Implementing Classes:
RowGroupModel
The model behind the
RowGroupExpandCollapseLayer contains
IRowGroups which in turn contain lists of row objects of type T.-
Field Summary
Fields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
DOT, VALUE_SEPARATOR -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddRowGroup(IRowGroup<T> rowGroup) Adds a group into the model.voidaddRowGroups(List<IRowGroup<T>> rowGroups) Adds multiple row groups into the model and only fires off a single change notification.voidclear()Wipes all groups from the model.intgetIndexFromRowCache(T row) Retrieves a row's index by from our cache.getRowFromIndexCache(int rowIndex) Retrieves a row T by it's index from our cache.getRowGroupForName(String groupName) Returns an theIRowGroupwith the specified group name.getRowGroupForRow(T row) Returns the firstIRowGroupfound containing the specified row.voidbooleanisEmpty()voidNotify anyIRowGroupModelListeners that something in the model has changed.voidRegisters a listener to the model to receive notification of any changes.booleanremoveRowGroup(IRowGroup<T> rowGroup) Removes the group from the model.voidsetDataProvider(IRowDataProvider<T> dataProvider) Required for the index-to-row cache to populate itseld.voidUnregisters the listener from the model.Methods inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
loadState, saveState
-
Method Details
-
addRowGroup
Adds a group into the model.
A notification should be sent to any
IRowGroupModelListeners to indicate a change in the model has occurred.- Parameters:
rowGroup- TheIRowGroupto be added.- Returns:
- false if the group wasn't added.
-
addRowGroups
Adds multiple row groups into the model and only fires off a single change notification.
- Parameters:
rowGroups- A list ofIRowGroups to add.
-
removeRowGroup
Removes the group from the model.
A notification should be sent to any
IRowGroupModelListeners to indicate a change in the model has occurred.- Parameters:
rowGroup- TheIRowGroupto remove.- Returns:
- true if the group was present and removed, false if the group was not present.
-
getRowGroups
-
getRowGroupForName
Returns an theIRowGroupwith the specified group name. -
getRowGroupForRow
Returns the firstIRowGroupfound containing the specified row.- Parameters:
row- The row object.- Returns:
- An
IRowGroupor null if there is no group with the specified row.
-
isEmpty
boolean isEmpty()- Returns:
- true if there are no
IRowGroups in the model. Note: if there are groups but there are no rows, then true is still returned.
-
clear
void clear()Wipes all groups from the model.
A notification should be sent to any
IRowGroupModelListeners to indicate a change in the model has occurred. -
notifyListeners
void notifyListeners()Notify any
IRowGroupModelListeners that something in the model has changed. -
registerRowGroupModelListener
Registers a listener to the model to receive notification of any changes.- Parameters:
listener- anIRowGroupModelListener.
-
unregisterRowGroupModelListener
Unregisters the listener from the model.- Parameters:
listener- anIRowGroupModelListener.
-
getRowFromIndexCache
Retrieves a row T by it's index from our cache. It will be added to the cache if not present. -
getIndexFromRowCache
Retrieves a row's index by from our cache. It will be added to the cache if not present. -
setDataProvider
Required for the index-to-row cache to populate itseld. -
getDataProvider
IRowDataProvider<T> getDataProvider()- Returns:
- an
IRowDataProviderused for the index-to-row cache.
-
invalidateIndexCache
void invalidateIndexCache()
-