Search in sources :

Example 11 with ILayerCommand

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

the class SearchDialog method doSelect.

private void doSelect(SelectionItem selection) {
    ILayerCommand command;
    if (selection.pos.columnPosition != SelectionLayer.NO_SELECTION) {
        command = createSelectCellCommand(selection.pos);
    } else {
        command = new ClearAllSelectionsCommand();
    }
    final ILayerCommand finalCommand = command;
    BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {

        @Override
        public void run() {
            SearchDialog.this.natTable.doCommand(finalCommand);
        }
    });
}
Also used : ClearAllSelectionsCommand(org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand) ILayerCommand(org.eclipse.nebula.widgets.nattable.command.ILayerCommand)

Aggregations

ILayerCommand (org.eclipse.nebula.widgets.nattable.command.ILayerCommand)11 Test (org.junit.Test)6 ColumnReorderCommand (org.eclipse.nebula.widgets.nattable.reorder.command.ColumnReorderCommand)2 LayerCommandFixture (org.eclipse.nebula.widgets.nattable.test.fixture.command.LayerCommandFixture)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 AbstractRegionCommand (org.eclipse.nebula.widgets.nattable.command.AbstractRegionCommand)1 MultiColumnReorderCommand (org.eclipse.nebula.widgets.nattable.reorder.command.MultiColumnReorderCommand)1 ClearAllSelectionsCommand (org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand)1 Point (org.eclipse.swt.graphics.Point)1