Search in sources :

Example 1 with AutoResizeColumnsCommand

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

the class InitializeAutoResizeColumnsCommandHandler method doCommand.

@Override
protected boolean doCommand(InitializeAutoResizeColumnsCommand initCommand) {
    int columnPosition = initCommand.getColumnPosition();
    if (this.selectionLayer.isColumnPositionFullySelected(columnPosition)) {
        initCommand.setSelectedColumnPositions(this.selectionLayer.getFullySelectedColumnPositions());
    } else {
        initCommand.setSelectedColumnPositions(new int[] { columnPosition });
    }
    // Fire command carrying the selected columns
    initCommand.getSourceLayer().doCommand(new AutoResizeColumnsCommand(initCommand));
    return true;
}
Also used : InitializeAutoResizeColumnsCommand(org.eclipse.nebula.widgets.nattable.resize.command.InitializeAutoResizeColumnsCommand) AutoResizeColumnsCommand(org.eclipse.nebula.widgets.nattable.resize.command.AutoResizeColumnsCommand)

Aggregations

AutoResizeColumnsCommand (org.eclipse.nebula.widgets.nattable.resize.command.AutoResizeColumnsCommand)1 InitializeAutoResizeColumnsCommand (org.eclipse.nebula.widgets.nattable.resize.command.InitializeAutoResizeColumnsCommand)1