use of net.sourceforge.nattable.print.command.TurnViewportOnCommand in project translationstudio8 by heartsome.
the class GridLayerPrinter method restoreGridLayerState.
private void restoreGridLayerState() {
gridLayer.setClientAreaProvider(originalClientAreaProvider);
gridLayer.doCommand(new TurnViewportOnCommand());
}
use of net.sourceforge.nattable.print.command.TurnViewportOnCommand in project translationstudio8 by heartsome.
the class PrintAction method run.
public void run(NatTable natTable, KeyEvent event) {
natTable.doCommand(new TurnViewportOffCommand());
natTable.doCommand(new PrintCommand(natTable.getConfigRegistry(), natTable.getShell()));
natTable.doCommand(new TurnViewportOnCommand());
}
use of net.sourceforge.nattable.print.command.TurnViewportOnCommand 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.TurnViewportOnCommand 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