Search in sources :

Example 1 with AutoResizeRowsCommand

use of org.eclipse.nebula.widgets.nattable.resize.command.AutoResizeRowsCommand in project nebula.widgets.nattable by eclipse.

the class InitializeAutoResizeRowsCommandHandler method doCommand.

@Override
protected boolean doCommand(InitializeAutoResizeRowsCommand initCommand) {
    int rowPosition = initCommand.getRowPosition();
    if (this.selectionLayer.isRowPositionFullySelected(rowPosition)) {
        initCommand.setSelectedRowPositions(this.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(org.eclipse.nebula.widgets.nattable.resize.command.AutoResizeRowsCommand) InitializeAutoResizeRowsCommand(org.eclipse.nebula.widgets.nattable.resize.command.InitializeAutoResizeRowsCommand)

Aggregations

AutoResizeRowsCommand (org.eclipse.nebula.widgets.nattable.resize.command.AutoResizeRowsCommand)1 InitializeAutoResizeRowsCommand (org.eclipse.nebula.widgets.nattable.resize.command.InitializeAutoResizeRowsCommand)1