use of net.sourceforge.nattable.selection.command.MoveSelectionCommand in project translationstudio8 by heartsome.
the class MoveToLastColumnAction method run.
public void run(NatTable natTable, KeyEvent event) {
super.run(natTable, event);
natTable.doCommand(new MoveSelectionCommand(MoveDirectionEnum.RIGHT, SelectionLayer.MOVE_ALL, isShiftMask(), isControlMask()));
}
use of net.sourceforge.nattable.selection.command.MoveSelectionCommand in project translationstudio8 by heartsome.
the class SingleEditHandler method commit.
/**
* {@inheritDoc}
* Note: Assumes that the value is valid.<br/>
*/
public boolean commit(MoveDirectionEnum direction, boolean closeEditorAfterCommit) {
Object canonicalValue = cellEditor.getCanonicalValue();
switch(direction) {
case LEFT:
layer.doCommand(new MoveSelectionCommand(MoveDirectionEnum.LEFT, 1, false, false));
break;
case RIGHT:
layer.doCommand(new MoveSelectionCommand(MoveDirectionEnum.RIGHT, 1, false, false));
break;
}
boolean committed = layer.doCommand(new UpdateDataCommand(layer, columnPosition, rowPosition, canonicalValue));
if (committed && closeEditorAfterCommit) {
cellEditor.close();
return true;
}
return committed;
}
Aggregations