final NatTable natTable = new NatTable(parent, gridLayer, false);
DataLayer bodyDataLayer = (DataLayer) gridLayer.getBodyDataLayer();
// Add an AggregrateConfigLabelAccumulator - we can add other
// accumulators to this as required
AggregrateConfigLabelAccumulator aggregrateConfigLabelAccumulator = new AggregrateConfigLabelAccumulator();
bodyDataLayer
.setConfigLabelAccumulator(aggregrateConfigLabelAccumulator);
ColumnOverrideLabelAccumulator columnLabelAccumulator = new ColumnOverrideLabelAccumulator(
bodyDataLayer);
ColumnOverrideLabelAccumulator bodyLabelAccumulator = new ColumnOverrideLabelAccumulator(
bodyDataLayer);
aggregrateConfigLabelAccumulator.add(columnLabelAccumulator);
aggregrateConfigLabelAccumulator.add(bodyLabelAccumulator);
// Add a label for the highlighted column
// We will add a style for this label to the config registry in a bit
bodyLabelAccumulator.registerColumnOverrides(2, BODY_LABEL_1);
columnLabelAccumulator.registerColumnOverrides(2, COLUMN_LABEL_1);