Class GroupByTreeFormat<T>
java.lang.Object
org.eclipse.nebula.widgets.nattable.extension.glazedlists.groupBy.GroupByTreeFormat<T>
- Type Parameters:
T
- The type of the base objects carried in the TreeList.
- All Implemented Interfaces:
ca.odell.glazedlists.TreeList.Format<Object>
public class GroupByTreeFormat<T>
extends Object
implements ca.odell.glazedlists.TreeList.Format<Object>
The TreeList.Format that is used by the TreeList that is created and used by
the GroupByDataLayer. Note that the TreeList created by the GroupByDataLayer
is generic for Object because the groupBy functionality will add
GroupByObjects to the path for creating the grouping.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
allowsChildren
(Object element) void
Clear the comparator local cache of summary information that is used to increase performance on sorting.getComparator
(int depth) protected GroupByObject
getGroupByObject
(Object columnValue, Map<Integer, Object> descriptor) void
void
setComparator
(IGroupByComparator<T> comparator) void
setSortModel
(ISortModel model)
-
Constructor Details
-
GroupByTreeFormat
- Parameters:
model
- The GroupByModel that carries the information about the groupBy states.columnAccessor
- The IColumnAccessor that is used to get the column value for the columns that are grouped by. Needed for compare operations and creating the path in the tree.
-
-
Method Details
-
getPath
- Specified by:
getPath
in interfaceca.odell.glazedlists.TreeList.Format<T>
-
getGroupByObject
- Parameters:
columnValue
- The column value that is used to create theGroupByObject
. Specifies the groupBy value.descriptor
- The descriptor that is used to create theGroupByObject
. Specifies the groupBy depth.- Returns:
- The
GroupByObject
for the given value and descriptor.
-
allowsChildren
- Specified by:
allowsChildren
in interfaceca.odell.glazedlists.TreeList.Format<T>
-
getComparator
- Specified by:
getComparator
in interfaceca.odell.glazedlists.TreeList.Format<T>
-
clearComparatorCache
public void clearComparatorCache()Clear the comparator local cache of summary information that is used to increase performance on sorting. Can be called often since the cache is only valid for a sorting operation. -
setSortModel
- Parameters:
model
- TheISortModel
that should be set to theIGroupByComparator
.- See Also:
-
getSortModel
- Returns:
- The
ISortModel
that is set to theIGroupByComparator
. - See Also:
-
setComparator
- Parameters:
comparator
- TheIGroupByComparator
that should be used to sort theTreeList
in order to be able to build the tree structure correctly.
-