blob: 14cdb007ac579ff6ace83c143a2d814a2962c6c4 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2012, 2020 Original 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 authors and others - initial API and implementation
******************************************************************************/
package org.eclipse.nebula.widgets.nattable.hideshow.command;
import org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler;
import org.eclipse.nebula.widgets.nattable.hideshow.ColumnHideShowLayer;
import org.eclipse.nebula.widgets.nattable.hideshow.IColumnHideShowLayer;
public class ShowAllColumnsCommandHandler extends AbstractLayerCommandHandler<ShowAllColumnsCommand> {
private final IColumnHideShowLayer columnHideShowLayer;
/**
*
* @param columnHideShowLayer
* The {@link IColumnHideShowLayer} on which this command handler
* should operate.
*/
public ShowAllColumnsCommandHandler(ColumnHideShowLayer columnHideShowLayer) {
this.columnHideShowLayer = columnHideShowLayer;
}
/**
*
* @param columnHideShowLayer
* The {@link IColumnHideShowLayer} on which this command handler
* should operate.
* @since 1.6
*/
public ShowAllColumnsCommandHandler(IColumnHideShowLayer columnHideShowLayer) {
this.columnHideShowLayer = columnHideShowLayer;
}
@Override
public Class<ShowAllColumnsCommand> getCommandClass() {
return ShowAllColumnsCommand.class;
}
@Override
protected boolean doCommand(ShowAllColumnsCommand command) {
this.columnHideShowLayer.showAllColumns();
return true;
}
}