Search in sources :

Example 1 with AutoResizeRowsCommand

use of net.sourceforge.nattable.resize.command.AutoResizeRowsCommand in project translationstudio8 by heartsome.

the class InitializeAutoResizeRowsCommandHandler method doCommand.

@Override
protected boolean doCommand(InitializeAutoResizeRowsCommand initCommand) {
    int rowPosition = initCommand.getRowPosition();
    if (selectionLayer.isRowFullySelected(rowPosition)) {
        initCommand.setSelectedRowPositions(selectionLayer.getFullySelectedRowPositions());
    } else {
        initCommand.setSelectedRowPositions(new int[] { rowPosition });
    }
    // Fire command carrying the selected columns
    initCommand.getSourceLayer().doCommand(new AutoResizeRowsCommand(initCommand));
    return true;
}
Also used : AutoResizeRowsCommand(net.sourceforge.nattable.resize.command.AutoResizeRowsCommand) InitializeAutoResizeRowsCommand(net.sourceforge.nattable.resize.command.InitializeAutoResizeRowsCommand)

Aggregations

AutoResizeRowsCommand (net.sourceforge.nattable.resize.command.AutoResizeRowsCommand)1 InitializeAutoResizeRowsCommand (net.sourceforge.nattable.resize.command.InitializeAutoResizeRowsCommand)1