use of org.eclipse.nebula.widgets.nattable.resize.command.MultiRowResizeCommand in project nebula.widgets.nattable by eclipse.
the class AutoResizeRowCommandHandler method doCommand.
@Override
public boolean doCommand(ILayer targetLayer, AutoResizeRowsCommand command) {
// Need to resize selected rows even if they are outside the viewport
targetLayer.doCommand(new TurnViewportOffCommand());
int[] rowPositions = ObjectUtils.asIntArray(command.getRowPositions());
int[] gridRowPositions = command.doPositionTransformation() ? convertFromPositionToCommandLayer(rowPositions) : rowPositions;
int[] gridRowHeights = MaxCellBoundsHelper.getPreferredRowHeights(command.getConfigRegistry(), command.getGCFactory(), this.commandLayer, gridRowPositions);
this.commandLayer.doCommand(new MultiRowResizeCommand(this.commandLayer, gridRowPositions, gridRowHeights, true));
targetLayer.doCommand(new TurnViewportOnCommand());
return true;
}
Aggregations