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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowsChildren(Object element) voidClear the comparator local cache of summary information that is used to increase performance on sorting.getComparator(int depth) protected GroupByObjectgetGroupByObject(Object columnValue, Map<Integer, Object> descriptor) voidvoidsetComparator(IGroupByComparator<T> comparator) voidsetSortModel(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:
getPathin 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
GroupByObjectfor the given value and descriptor.
-
allowsChildren
- Specified by:
allowsChildrenin interfaceca.odell.glazedlists.TreeList.Format<T>
-
getComparator
- Specified by:
getComparatorin 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- TheISortModelthat should be set to theIGroupByComparator.- See Also:
-
getSortModel
- Returns:
- The
ISortModelthat is set to theIGroupByComparator. - See Also:
-
setComparator
- Parameters:
comparator- TheIGroupByComparatorthat should be used to sort theTreeListin order to be able to build the tree structure correctly.
-