blob: ea9e0968ce1180a002b7ff05063ddc32929c6aeb [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 org.eclipse.statet.ecommons.waltable.layer.LabelStack;
/**
* Accumulator for column labels allowing to configure cells by their column position.
*
* The label of a column is {@link #COLUMN_LABEL_PREFIX} + column position.
*/
public class ColumnLabelAccumulator implements IConfigLabelAccumulator {
/**
* The common prefix of column labels (value is {@value}).
*/
public static final String COLUMN_LABEL_PREFIX= "COLUMN_"; //$NON-NLS-1$
@Override
public void accumulateConfigLabels(final LabelStack configLabels, final long columnPosition, final long rowPosition) {
configLabels.addLabel(COLUMN_LABEL_PREFIX + columnPosition);
}
}