Class InlineEditHandler
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.edit.InlineEditHandler
-
- All Implemented Interfaces:
ICellEditHandler
public class InlineEditHandler extends Object implements ICellEditHandler
ICellEditHandler
that handles inline editing of single values. On commit it will execute anUpdateDataCommand
for the specified value and move the selection in the NatTable.
-
-
Constructor Summary
Constructors Constructor Description InlineEditHandler(ILayer layer, int columnPosition, int rowPosition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
commit(Object canonicalValue, SelectionLayer.MoveDirectionEnum direction)
Commit the new value and handle the selection in the current NatTable after commit.
-
-
-
Constructor Detail
-
InlineEditHandler
public InlineEditHandler(ILayer layer, int columnPosition, int rowPosition)
- Parameters:
layer
- TheILayer
to which the column and row positions are related to and on which the update command should be executedcolumnPosition
- The column position of the cell that is editedrowPosition
- The row position of the cell that is edited
-
-
Method Detail
-
commit
public boolean commit(Object canonicalValue, SelectionLayer.MoveDirectionEnum direction)
Description copied from interface:ICellEditHandler
Commit the new value and handle the selection in the current NatTable after commit. This is necessary to support spreadsheet like behaviour, e.g. after committing a value entered in a text editor by pressing tab, the selection should move to the right. To avoid unnecessary dependencies in the editors itself, this is handled in here.- Specified by:
commit
in interfaceICellEditHandler
- Parameters:
canonicalValue
- The value to commit.direction
- The direction to move the selection after commit.- Returns:
true
if the data update succeeded,false
if something went wrong
-
-