return Double.compare(e1.getTime(), e2.getTime());
}
});
Item newSelection = selected.get(selected.size() - 1);
// Find how far to move table down to current selection.
// We have to recursively walk up to compute the correct offset top.
// We will encounter the UI padding two extra times along the way
// crossing the tree boundary and crossing the details div boundary,
// totally 3 encounters with padding we have to account for.
int minTableOffset = Math.max(pieChartHeight,
recursiveGetOffsetTop(newSelection.getElement())
- (3 * getCss().uiPadding()));
if (selected.size() == 1) {
// We have a single selection. Simply display the details for the
// single node.
detailsTable = createDetailsTable(detailsTableContainer,
minTableOffset, (UiEvent) newSelection.getItemTarget());
} else {
// Display aggregate information over the range of nodes.
detailsTable = createMultiNodeDetailsTable(detailsTableContainer,
minTableOffset, selected);