}
@Override
public Object getDataValueByPosition(final int columnPosition,
final int rowPosition) {
LabelStack labelStack = getConfigLabelsByPosition(columnPosition,
rowPosition);
if (labelStack.hasLabel(GROUP_BY_OBJECT)) {
GroupByObject groupByObject = (GroupByObject) this.treeData
.getDataAtIndex(rowPosition);
// ensure to only load the children if they are needed
List<T> children = null;
final IGroupBySummaryProvider<T> summaryProvider = getGroupBySummaryProvider(labelStack);
if (summaryProvider != null) {
children = getElementsInGroup(groupByObject);
final List<T> c = children;
return this.valueCache.getCalculatedValue(columnPosition,
rowPosition, new GroupByValueCacheKey(columnPosition,
rowPosition, groupByObject), true,
new ICalculator() {
@Override
public Object executeCalculation() {
return summaryProvider.summarize(
columnPosition, c);
}
});
}
if (this.configRegistry != null) {
String childCountPattern = this.configRegistry
.getConfigAttribute(
GroupByConfigAttributes.GROUP_BY_CHILD_COUNT_PATTERN,
DisplayMode.NORMAL, labelStack.getLabels());
if (childCountPattern != null && childCountPattern.length() > 0) {
if (children == null) {
children = getElementsInGroup(groupByObject);
}