Interface IRowGroup<T>
- Type Parameters:
T- the type of the row objects.
- All Known Implementing Classes:
RowGroup
IRowGroupModel.- Author:
- Stefan Bolton
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMemberRow(T row) Adds the row into the group.voidaddMemberRows(List<T> rows) Adds multiple rows into the group.voidaddRowGroup(IRowGroup<T> rowGroup) Adds a row-group into the group.voidaddStaticMemberRow(T row) Adds a static row into the group.voidclear()Removes all member and static member rows from the group.voidcollapse()Updates the group's state to indicate it is collapsed.voidexpand()Updates the group's state to indicate it is expanded.getData()Allows some arbitrary data to be retrieved from an IRowGroup.Allows some arbitrary data to be retrieved from an IRowGroup.getMemberRows(boolean includeStaticRows) getOwnMemberRows(boolean includeStaticRows) Returns only the rows contained with this group.If this group is a nested child of another this will return the parent group.getRowGroupForRow(T row) Retrieves the sub-group for a given row member.booleanbooleanbooleanisEmpty()booleanremoveMemberRow(T row) Removes the row from the group whether it's static or non-static.voidremoveMemberRows(List<T> rows) Removes multiple rows from the group whether they are static or non-static.booleanremoveRowGroup(IRowGroup<T> rowGroup) Returns the row-group child of this group.voidAllows some arbitrary data to be tagged to an IRowGroup.voidAllows some arbitrary data to be tagged to an IRowGroup.voidsetParentGroup(IRowGroup<T> parentGroup) Set the specified group as the parent of this group.
-
Method Details
-
getGroupName
String getGroupName()- Returns:
- A Unique name for the group - it must not conflict with any other group's name.
-
getParentGroup
If this group is a nested child of another this will return the parent group.- Returns:
- The parent group if this group is a nested child.
-
setParentGroup
Set the specified group as the parent of this group.- Parameters:
parentGroup-
-
isCollapsed
boolean isCollapsed()- Returns:
- Whether the group has been expanded or collapsed. A collapsed group will hide all members of the group apart from any 'static' rows.
-
isCollapseable
boolean isCollapseable()- Returns:
- Whether the group can be expanded or collapsed or, false if it should be locked in it's current state.
-
collapse
void collapse()Updates the group's state to indicate it is collapsed.
A notification should be sent to any
IRowGroupModelListeners to indicate a change in the model has occurred. -
expand
void expand()Updates the group's state to indicate it is expanded.
A notification should be sent to any
IRowGroupModelListeners to indicate a change in the model has occurred. -
addMemberRow
Adds the row into the group.
- Parameters:
row- the row to be added
-
addMemberRows
Adds multiple rows into the group.
- Parameters:
rows- AListof rows T to be added.
-
addStaticMemberRow
Adds a static row into the group. A static row is one that is always shown when the group is collapsed (summary data rows for example).
- Parameters:
row- the static row T to be added.
-
removeMemberRow
Removes the row from the group whether it's static or non-static.
Existing positions in the model may be bumped up if the row was not the last row in the model.
A notification should be sent to any
IRowGroupModelListeners to indicate a change in the model has occurred.- Parameters:
row- The row T to be removed.- Returns:
- true if the row existed and was removed.
-
removeMemberRows
Removes multiple rows from the group whether they are static or non-static.
Existing positions in the model may be bumped up if the row was not the last row in the model.
A notification should be sent to any
IRowGroupModelListeners to indicate a change in the model has occurred.- Parameters:
rows- AListof rows T to be added.
-
getMemberRows
-
getStaticMemberRows
-
clear
void clear()Removes all member and static member rows from the group. -
isEmpty
boolean isEmpty()- Returns:
trueif there are no rows (normal or static) in the group.
-
addRowGroup
Adds a row-group into the group. Calls to getMemberRows and getStaticMemberRows will recurse through nested groups and return a flattened list of rows in all contained groups.- Parameters:
rowGroup- a IHierarchicalRowGroup.
-
removeRowGroup
Returns the row-group child of this group.- Parameters:
rowGroup- a IHierarchicalRowGroup.- Returns:
- true if the group existed as a child and was removed.
-
getRowGroups
- Returns:
- an unmodifiable
Listof the groups which are direct children of this group.
-
getOwnMemberRows
Returns only the rows contained with this group. Not nested groups.- Returns:
- a list of rows T.
-
getOwnStaticMemberRows
- Returns:
- Static rows only in this group not in nested groups.
-
getRowGroupForRow
Retrieves the sub-group for a given row member. -
setData
Allows some arbitrary data to be tagged to an IRowGroup.- Parameters:
data-
-
setData
Allows some arbitrary data to be tagged to an IRowGroup.- Parameters:
data-
-
getData
Object getData()Allows some arbitrary data to be retrieved from an IRowGroup. -
getData
Allows some arbitrary data to be retrieved from an IRowGroup.
-