use of net.sourceforge.nattable.resize.command.MultiRowResizeCommand in project translationstudio8 by heartsome.
the class AutoResizeRowCommandHandler method doCommand.
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 = convertFromSelectionToGrid(rowPositions);
int[] gridRowHeights = MaxCellBoundsHelper.getPreferedRowHeights(command.getConfigRegistry(), command.getGC(), gridLayer, gridRowPositions);
gridLayer.doCommand(new MultiRowResizeCommand(gridLayer, gridRowPositions, gridRowHeights));
targetLayer.doCommand(new TurnViewportOnCommand());
return true;
}
use of net.sourceforge.nattable.resize.command.MultiRowResizeCommand 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;
}
Aggregations