use of org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand in project nebula.widgets.nattable by eclipse.
the class RowReorderDragMode method mouseDown.
@Override
public void mouseDown(NatTable natTable, MouseEvent event) {
this.natTable = natTable;
this.initialEvent = event;
this.currentEvent = this.initialEvent;
this.dragFromGridRowPosition = getDragFromGridRowPosition();
natTable.addOverlayPainter(this.targetOverlayPainter);
natTable.doCommand(new ClearAllSelectionsCommand());
fireMoveStartCommand(natTable, this.dragFromGridRowPosition);
}
use of org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand in project nebula.widgets.nattable by eclipse.
the class SingleRowSelectionDragMode method mouseMove.
@Override
public void mouseMove(NatTable natTable, MouseEvent event) {
natTable.doCommand(new ClearAllSelectionsCommand());
if (event.x > natTable.getWidth()) {
return;
}
int selectedColumnPosition = natTable.getColumnPositionByX(event.x);
int selectedRowPosition = natTable.getRowPositionByY(event.y);
if (selectedColumnPosition > -1 && selectedRowPosition > -1) {
fireSelectionCommand(natTable, selectedColumnPosition, selectedRowPosition, false, false);
}
}
use of org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand 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);
}
});
}
use of org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand in project nebula.widgets.nattable by eclipse.
the class ColumnReorderDragMode method mouseDown.
@Override
public void mouseDown(NatTable natTable, MouseEvent event) {
this.natTable = natTable;
this.initialEvent = event;
this.currentEvent = this.initialEvent;
this.dragFromGridColumnPosition = getDragFromGridColumnPosition();
natTable.addOverlayPainter(this.targetOverlayPainter);
natTable.doCommand(new ClearAllSelectionsCommand());
fireMoveStartCommand(natTable, this.dragFromGridColumnPosition);
}
use of org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand in project nebula.widgets.nattable by eclipse.
the class SingleRowSelectionDragMode method mouseMove.
@Override
public void mouseMove(NatTable natTable, MouseEvent event) {
natTable.doCommand(new ClearAllSelectionsCommand());
if (event.x > natTable.getWidth()) {
return;
}
int selectedColumnPosition = natTable.getColumnPositionByX(event.x);
int selectedRowPosition = natTable.getRowPositionByY(event.y);
if (selectedColumnPosition > -1 && selectedRowPosition > -1) {
fireSelectionCommand(natTable, selectedColumnPosition, selectedRowPosition, false, false);
}
}
Aggregations