use of net.sourceforge.nattable.selection.command.MoveSelectionCommand in project translationstudio8 by heartsome.
the class HsMultiCellEditorHandler method commit.
/**
* Just commit the data, will not close the editor control
* @see net.sourceforge.nattable.edit.ICellEditHandler#commit(net.sourceforge.nattable.selection.SelectionLayer.MoveDirectionEnum, boolean)
*/
public boolean commit(MoveDirectionEnum direction, boolean closeEditorAfterCommit) {
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;
}
if (cellEditor.isEditable()) {
Object canonicalValue = cellEditor.getCanonicalValue();
DataLayer datalayer = LayerUtil.getLayer((CompositeLayer) layer, DataLayer.class);
datalayer.doCommand(new UpdateDataAndAutoResizeCommand(layer, cellEditor.getColumnIndex(), cellEditor.getRowIndex(), canonicalValue));
// layer.doCommand(new UpdateDataCommand(layer, cellEditor.getColumnPosition(), cellEditor.getRowPosition(), canonicalValue));
}
return true;
}
use of net.sourceforge.nattable.selection.command.MoveSelectionCommand in project translationstudio8 by heartsome.
the class MoveSelectionAction method run.
@Override
public void run(NatTable natTable, KeyEvent event) {
super.run(natTable, event);
natTable.doCommand(new MoveSelectionCommand(getDirection(), 1, isShiftMask(), isControlMask()));
}
use of net.sourceforge.nattable.selection.command.MoveSelectionCommand in project translationstudio8 by heartsome.
the class MoveToFirstColumnAction method run.
public void run(NatTable natTable, KeyEvent event) {
super.run(natTable, event);
natTable.doCommand(new MoveSelectionCommand(MoveDirectionEnum.LEFT, SelectionLayer.MOVE_ALL, isShiftMask(), isControlMask()));
}
use of net.sourceforge.nattable.selection.command.MoveSelectionCommand in project translationstudio8 by heartsome.
the class MoveToFirstRowAction method run.
@Override
public void run(NatTable natTable, KeyEvent event) {
super.run(natTable, event);
natTable.doCommand(new MoveSelectionCommand(MoveDirectionEnum.UP, SelectionLayer.MOVE_ALL, isShiftMask(), isControlMask()));
}
use of net.sourceforge.nattable.selection.command.MoveSelectionCommand in project translationstudio8 by heartsome.
the class MoveToLastRowAction method run.
@Override
public void run(NatTable natTable, KeyEvent event) {
super.run(natTable, event);
natTable.doCommand(new MoveSelectionCommand(MoveDirectionEnum.DOWN, SelectionLayer.MOVE_ALL, isShiftMask(), isControlMask()));
}
Aggregations