| /*=============================================================================# |
| # 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.resize; |
| |
| import org.eclipse.statet.ecommons.waltable.command.AbstractDimPositionsCommand; |
| import org.eclipse.statet.ecommons.waltable.command.ILayerCommand; |
| import org.eclipse.statet.ecommons.waltable.coordinate.LRangeList; |
| import org.eclipse.statet.ecommons.waltable.layer.ILayerDim; |
| |
| |
| /** |
| * Command indicating that all selected columns have to be auto resized i.e made |
| * wide enough to just fit the widest cell. This should also take the column |
| * header into account |
| * |
| * Note: The {@link InitializeAutoResizeCommand} has to be fired first |
| * when autoresizing columns. |
| */ |
| public class AutoResizePositionsCommand extends AbstractDimPositionsCommand { |
| |
| |
| public AutoResizePositionsCommand(final ILayerDim layerDim, final LRangeList columnPositions) { |
| super(layerDim, columnPositions); |
| } |
| |
| protected AutoResizePositionsCommand(final AutoResizePositionsCommand command) { |
| super(command); |
| } |
| |
| @Override |
| public ILayerCommand cloneCommand() { |
| return new AutoResizePositionsCommand(this); |
| } |
| |
| } |