Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public interface GridCellPicker

Takes the taps on the cells of a grid while an editor wants them, the way a spreadsheet puts a reference into the formula being typed when a cell is tapped. Set with DataGrid#setCellPicker(GridCellPicker).

Methods

public abstract boolean isPicking(DataGrid grid)Whether a tap on a cell now goes to #cellPicked(DataGrid, int, int, boolean) and not to the grid.
public abstract void cellPicked(DataGrid grid, int row, int column, boolean extend)A cell was tapped while #isPicking(DataGrid) was true.

Method details

isPicking

public abstract boolean isPicking(DataGrid grid)
Whether a tap on a cell now goes to #cellPicked(DataGrid, int, int, boolean) and not to the grid. While it is false the grid does what it always does: it ends an edit in progress and selects the cell.

Parameters

grid DataGrid
the grid

Returns

true to take the tap

cellPicked

public abstract void cellPicked(DataGrid grid, int row, int column, boolean extend)
A cell was tapped while #isPicking(DataGrid) was true. The grid keeps its selection and any edit in progress.

Parameters

grid DataGrid
the grid
row int
the row, as the grid shows it
column int
the column, an index among the visible columns
extend boolean
true when Shift was held, which a spreadsheet takes as widening what was picked last into a range