use of net.sourceforge.nattable.edit.command.EditCellCommand in project translationstudio8 by heartsome.
the class CellEditDragMode method mouseUp.
public void mouseUp(NatTable natTable, MouseEvent event) {
super.mouseUp(natTable, event);
int columnPosition = natTable.getColumnPositionByX(event.x);
int rowPosition = natTable.getRowPositionByY(event.y);
if (columnPosition == originalColumnPosition && rowPosition == originalRowPosition) {
natTable.doCommand(new EditCellCommand(natTable, natTable.getConfigRegistry(), natTable.getCellByPosition(columnPosition, rowPosition)));
}
}
use of net.sourceforge.nattable.edit.command.EditCellCommand in project translationstudio8 by heartsome.
the class MouseEditAction method run.
public void run(NatTable natTable, MouseEvent event) {
int columnPosition = natTable.getColumnPositionByX(event.x);
int rowPosition = natTable.getRowPositionByY(event.y);
boolean withShiftMask = (event.stateMask & SWT.SHIFT) != 0;
boolean withCtrlMask = (event.stateMask & SWT.CTRL) != 0;
natTable.doCommand(new SelectCellCommand(natTable, columnPosition, rowPosition, withShiftMask, withCtrlMask));
natTable.doCommand(new EditCellCommand(natTable, natTable.getConfigRegistry(), natTable.getCellByPosition(columnPosition, rowPosition)));
}
Aggregations