public interface IRowGroupModel<T> extends IPersistable
RowGroupExpandCollapseLayer
contains
IRowGroup
s which in turn contain lists of row objects of type T.DOT, VALUE_SEPARATOR
Modifier and Type | Method and Description |
---|---|
boolean |
addRowGroup(IRowGroup<T> rowGroup)
Adds a group into the model.
|
void |
addRowGroups(List<IRowGroup<T>> rowGroups)
Adds multiple row groups into the model and only fires off a single
change notification.
|
void |
clear()
Wipes all groups from the model.
|
IRowDataProvider<T> |
getDataProvider() |
int |
getIndexFromRowCache(T row)
Retrieves a row's index by from our cache.
|
T |
getRowFromIndexCache(int rowIndex)
Retrieves a row T by it's index from our cache.
|
IRowGroup<T> |
getRowGroupForName(String groupName)
Returns an the
IRowGroup with the specified group name. |
IRowGroup<T> |
getRowGroupForRow(T row)
Returns the first
IRowGroup found containing the specified row. |
List<IRowGroup<T>> |
getRowGroups() |
void |
invalidateIndexCache() |
boolean |
isEmpty() |
void |
notifyListeners()
Notify any
IRowGroupModelListener s that something in the model
has changed. |
void |
registerRowGroupModelListener(IRowGroupModelListener listener)
Registers a listener to the model to receive notification of any changes.
|
boolean |
removeRowGroup(IRowGroup<T> rowGroup)
Removes the group from the model.
|
void |
setDataProvider(IRowDataProvider<T> dataProvider)
Required for the index-to-row cache to populate itseld.
|
void |
unregisterRowGroupModelListener(IRowGroupModelListener listener)
Unregisters the listener from the model.
|
loadState, saveState
boolean addRowGroup(IRowGroup<T> rowGroup)
Adds a group into the model.
A notification should be sent to any IRowGroupModelListener
s to
indicate a change in the model has occurred.
rowGroup
- The IRowGroup
to be added.void addRowGroups(List<IRowGroup<T>> rowGroups)
Adds multiple row groups into the model and only fires off a single change notification.
rowGroups
- A list of IRowGroup
s to add.boolean removeRowGroup(IRowGroup<T> rowGroup)
Removes the group from the model.
A notification should be sent to any IRowGroupModelListener
s to
indicate a change in the model has occurred.
rowGroup
- The IRowGroup
to remove.IRowGroup<T> getRowGroupForName(String groupName)
IRowGroup
with the specified group name.IRowGroup<T> getRowGroupForRow(T row)
IRowGroup
found containing the specified row.row
- The row object.IRowGroup
or null if there is no group with the
specified row.boolean isEmpty()
IRowGroup
s in the model. Note: if
there are groups but there are no rows, then true is still
returned.void clear()
Wipes all groups from the model.
A notification should be sent to any IRowGroupModelListener
s to
indicate a change in the model has occurred.
void notifyListeners()
Notify any IRowGroupModelListener
s that something in the model
has changed.
void registerRowGroupModelListener(IRowGroupModelListener listener)
listener
- an IRowGroupModelListener
.void unregisterRowGroupModelListener(IRowGroupModelListener listener)
listener
- an IRowGroupModelListener
.T getRowFromIndexCache(int rowIndex)
int getIndexFromRowCache(T row)
void setDataProvider(IRowDataProvider<T> dataProvider)
IRowDataProvider<T> getDataProvider()
IRowDataProvider
used for the index-to-row cache.void invalidateIndexCache()
Copyright © 2013. All Rights Reserved.