use of net.sourceforge.nattable.print.command.TurnViewportOffCommand in project translationstudio8 by heartsome.
the class AutoResizeCurrentRowsCommandHandler method doCommand.
public boolean doCommand(ILayer targetLayer, AutoResizeCurrentRowsCommand command) {
// Need to resize selected rows even if they are outside the viewport
targetLayer.doCommand(new TurnViewportOffCommand());
int[] gridRowPositions = command.getRows();
int[] gridRowHeights = getPreferedRowHeights(command.getConfigRegistry(), layer, gridRowPositions);
layer.doCommand(new MultiRowResizeCommand(layer, gridRowPositions, gridRowHeights));
targetLayer.doCommand(new TurnViewportOnCommand());
return true;
}
use of net.sourceforge.nattable.print.command.TurnViewportOffCommand in project translationstudio8 by heartsome.
the class AutoResizeColumnCommandHandler method doCommand.
public boolean doCommand(ILayer targetLayer, AutoResizeColumnsCommand command) {
// Need to resize selected columns even if they are outside the viewport
targetLayer.doCommand(new TurnViewportOffCommand());
int[] columnPositions = ObjectUtils.asIntArray(command.getColumnPositions());
int[] gridColumnPositions = convertFromSelectionToGrid(columnPositions);
int[] gridColumnWidths = MaxCellBoundsHelper.getPreferedColumnWidths(command.getConfigRegistry(), command.getGC(), gridLayer, gridColumnPositions);
gridLayer.doCommand(new MultiColumnResizeCommand(gridLayer, gridColumnPositions, gridColumnWidths));
targetLayer.doCommand(new TurnViewportOnCommand());
return true;
}
Aggregations