Search in sources :

Example 1 with AutoResizeColumnsCommand

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

the class InitializeAutoResizeColumnsCommandHandler method doCommand.

@Override
protected boolean doCommand(InitializeAutoResizeColumnsCommand initCommand) {
    int columnPosition = initCommand.getColumnPosition();
    if (selectionLayer.isColumnFullySelected(columnPosition)) {
        initCommand.setSelectedColumnPositions(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(net.sourceforge.nattable.resize.command.InitializeAutoResizeColumnsCommand) AutoResizeColumnsCommand(net.sourceforge.nattable.resize.command.AutoResizeColumnsCommand)

Aggregations

AutoResizeColumnsCommand (net.sourceforge.nattable.resize.command.AutoResizeColumnsCommand)1 InitializeAutoResizeColumnsCommand (net.sourceforge.nattable.resize.command.InitializeAutoResizeColumnsCommand)1