blob: edf7320b1d8ba37ace955a3dfa2a8696172390c8 [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2012, 2021 Original NatTable authors and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0.
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Original NatTable authors and others - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.ecommons.waltable.layer.cell;
import java.util.Arrays;
import java.util.List;
import org.eclipse.statet.ecommons.waltable.layer.LabelStack;
/**
* Applies the given labels to all the cells in the grid.
* Used to apply styles to the entire grid.
*/
public class BodyOverrideConfigLabelAccumulator implements IConfigLabelAccumulator {
private List<String> configLabels;
@Override
public void accumulateConfigLabels(final LabelStack configLabels, final long columnPosition, final long rowPosition) {
configLabels.getLabels().addAll(this.configLabels);
}
public void registerOverrides(final String... configLabels) {
this.configLabels= Arrays.asList(configLabels);
}
public void addOverride(final String configLabel) {
this.configLabels.add(configLabel);
}
}