BaseGridWidget extends Group implements GridWidget { @Override public boolean startEditingCell(final int uiRowIndex, final int uiColumnIndex) { return cellSelectionManager.startEditingCell(uiRowIndex, uiColumnIndex); } BaseGridWidget(final GridData model,
                          final GridSelectionManager selectionManager,
                          final GridPinnedModeManager pinnedModeManager,
                          final GridRenderer renderer); @Override CellSelectionManager getCellSelectionManager(); @Override GridData getModel(); @Override GridRenderer getRenderer(); @Override void setRenderer(final GridRenderer renderer); @Override BaseGridRendererHelper getRendererHelper(); @Override Group getBody(); @Override Group getHeader(); @Override double getWidth(); @Override double getHeight(); @Override void select(); @Override void deselect(); @Override boolean isSelected(); @Override Group setVisible(final boolean visible); @Override void onNodeMouseClick(final NodeMouseClickEvent event); @Override boolean onGroupingToggle(final double cellX,
                                    final double cellY,
                                    final double cellWidth,
                                    final double cellHeight); @Override boolean selectCell(final Point2D rp,
                              final boolean isShiftKeyDown,
                              final boolean isControlKeyDown); @Override boolean selectCell(final int uiRowIndex,
                              final int uiColumnIndex,
                              final boolean isShiftKeyDown,
                              final boolean isControlKeyDown); @Override boolean selectHeaderCell(final Point2D rp,
                                    final boolean isShiftKeyDown,
                                    final boolean isControlKeyDown); @Override boolean selectHeaderCell(final int uiHeaderRowIndex,
                                    final int uiHeaderColumnIndex,
                                    final boolean isShiftKeyDown,
                                    final boolean isControlKeyDown); @Override boolean adjustSelection(final SelectionExtension direction,
                                   final boolean isShiftKeyDown); @Override boolean startEditingCell(final int uiRowIndex,
                                    final int uiColumnIndex); @Override boolean startEditingCell(final Point2D rp); @Override boolean showContextMenuForHeader(final int uiHeaderRowIndex,
                                            final int uiHeaderColumnIndex); @Override boolean showContextMenuForCell(final int uiRowIndex,
                                          final int uiColumnIndex);  }
@Test public void startEditingCellMouseClick() { final Point2D rp = new Point2D(10, 20); gridWidget.startEditingCell(rp); final ArgumentCaptor<Point2D> pointArgumentCaptor = ArgumentCaptor.forClass(Point2D.class); verify(cellSelectionManager, times(1)).startEditingCell(pointArgumentCaptor.capture()); final Point2D point = pointArgumentCaptor.getValue(); assertEquals(rp, point); }
@Test public void startEditingCellKeyboardNavigation() { gridWidget.startEditingCell(0, 1); verify(cellSelectionManager, times(1)).startEditingCell(eq(0), eq(1)); }