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 an UpdateDataCommand for the specified value and move the selection in the NatTable.
  • Constructor Details

    • InlineEditHandler

      public InlineEditHandler(ILayer layer, int columnPosition, int rowPosition)
      Parameters:
      layer - The ILayer to which the column and row positions are related to and on which the update command should be executed
      columnPosition - The column position of the cell that is edited
      rowPosition - The row position of the cell that is edited
  • Method Details

    • 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 interface ICellEditHandler
      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