Interface GridCellEditor

All Known Implementing Classes:
DefaultGridCellEditor

public interface GridCellEditor

Edits the cells of a DataGrid column.

An editor lives only while a cell is edited. The grid asks for a component, lays it over the cell, starts editing it and, when the edit is done, reads the value back and throws the component away; from then on the cell is painted again. Nothing stays in the component hierarchy.

An editor calls DataGrid#commitEdit() when the user is done, and DataGrid#cancelEdit() to drop the edit. A boolean cell needs no editor: a tap toggles it.

  • Method Details

    • createEditor

      Component createEditor(DataGrid grid, GridCell cell)
      A component that edits the cell, holding its current value.
    • getEditorValue

      Object getEditorValue(Component editor, GridCell cell)

      The value the editor holds now.

      Parameters
      • editor: what createEditor returned
      • cell: the cell being edited; getValue() is the value before