@Test public void testEditNestedLiteralExpressionPMMLGrid() { final GridCell<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> cell = mock(GridCell.class); final GridCellValue<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> cellValue = mock(GridCellValue.class); final LiteralExpressionPMMLGrid leGrid = mock(LiteralExpressionPMMLGrid.class); when(cell.getValue()).thenReturn(cellValue); when(cellValue.getValue()).thenReturn(Optional.of(leGrid)); column.edit(cell, null, null); verify(leGrid).startEditingCell(0, 0); }
@Override public void edit(final GridCell<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> cell, final GridBodyCellEditContext context, final Consumer<GridCellValue<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>>> callback) { cell.getValue().getValue() .filter(nestedGrid -> nestedGrid instanceof UndefinedExpressionGrid) .ifPresent(nestedGrid -> nestedGrid.startEditingCell(0, 0)); cell.getValue().getValue() .filter(nestedGrid -> !(nestedGrid instanceof UndefinedExpressionGrid)) .ifPresent(BaseExpressionGrid::selectFirstCell); cell.getValue().getValue() .filter(nestedGrid -> nestedGrid instanceof LiteralExpressionGrid) .ifPresent(nestedGrid -> nestedGrid.startEditingCell(0, 0)); }
ExpressionEditorColumn extends DMNGridColumn<BaseGrid<? extends Expression>, Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> implements HasDOMElementResources { @Override public void edit(final GridCell<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> cell, final GridBodyCellEditContext context, final Consumer<GridCellValue<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>>> callback) { cell.getValue().getValue() .filter(nestedGrid -> nestedGrid instanceof UndefinedExpressionGrid) .ifPresent(nestedGrid -> nestedGrid.startEditingCell(0, 0)); cell.getValue().getValue() .filter(nestedGrid -> !(nestedGrid instanceof UndefinedExpressionGrid)) .ifPresent(BaseExpressionGrid::selectFirstCell); cell.getValue().getValue() .filter(nestedGrid -> nestedGrid instanceof LiteralExpressionGrid) .ifPresent(nestedGrid -> nestedGrid.startEditingCell(0, 0)); } }
ExpressionEditorColumn extends DMNGridColumn<BaseGrid<? extends Expression>, Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> implements HasDOMElementResources { @Override public void edit(final GridCell<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> cell, final GridBodyCellEditContext context, final Consumer<GridCellValue<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>>> callback) { cell.getValue().getValue() .filter(nestedGrid -> nestedGrid instanceof UndefinedExpressionGrid) .ifPresent(nestedGrid -> nestedGrid.startEditingCell(0, 0)); cell.getValue().getValue() .filter(nestedGrid -> !(nestedGrid instanceof UndefinedExpressionGrid)) .ifPresent(BaseExpressionGrid::selectFirstCell); cell.getValue().getValue() .filter(nestedGrid -> nestedGrid instanceof LiteralExpressionGrid) .ifPresent(nestedGrid -> nestedGrid.startEditingCell(0, 0)); } ExpressionEditorColumn(final GridWidgetRegistry registry,
                                  final HeaderMetaData headerMetaData,
                                  final double width,
                                  final BaseGrid<? extends Expression> gridWidget);  ExpressionEditorColumn(final GridWidgetRegistry registry,
                                  final List<HeaderMetaData> headerMetaData,
                                  final double width,
                                  final BaseGrid<? extends Expression> gridWidget); protected  ExpressionEditorColumn(final List<HeaderMetaData> headerMetaData,
                                     final BaseGridColumnRenderer<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> renderer,
                                     final double width,
                                     final BaseGrid<? extends Expression> gridWidget); }
ExpressionEditorColumn extends DMNGridColumn<BaseGrid<? extends Expression>, Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> implements HasDOMElementResources { @Override public void edit(final GridCell<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> cell, final GridBodyCellEditContext context, final Consumer<GridCellValue<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>>> callback) { cell.getValue().getValue() .filter(nestedGrid -> nestedGrid instanceof UndefinedExpressionGrid) .ifPresent(nestedGrid -> nestedGrid.startEditingCell(0, 0)); cell.getValue().getValue() .filter(nestedGrid -> !(nestedGrid instanceof UndefinedExpressionGrid)) .ifPresent(BaseExpressionGrid::selectFirstCell); cell.getValue().getValue() .filter(nestedGrid -> nestedGrid instanceof LiteralExpressionGrid) .ifPresent(nestedGrid -> nestedGrid.startEditingCell(0, 0)); } ExpressionEditorColumn(final GridWidgetRegistry registry,
                                  final HeaderMetaData headerMetaData,
                                  final double width,
                                  final BaseGrid<? extends Expression> gridWidget);  ExpressionEditorColumn(final GridWidgetRegistry registry,
                                  final List<HeaderMetaData> headerMetaData,
                                  final double width,
                                  final BaseGrid<? extends Expression> gridWidget); protected  ExpressionEditorColumn(final List<HeaderMetaData> headerMetaData,
                                     final BaseGridColumnRenderer<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> renderer,
                                     final double width,
                                     final BaseGrid<? extends Expression> gridWidget); @Override Double getMinimumWidth(); @Override void setWidth(final double width); @Override void setWidthInternal(final double width); @Override void edit(final GridCell<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> cell,
                     final GridBodyCellEditContext context,
                     final Consumer<GridCellValue<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>>> callback); }
ExpressionEditorColumn extends DMNGridColumn<BaseGrid<? extends Expression>, Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> implements HasDOMElementResources { @Override public void edit(final GridCell<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> cell, final GridBodyCellEditContext context, final Consumer<GridCellValue<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>>> callback) { cell.getValue().getValue() .filter(nestedGrid -> nestedGrid instanceof UndefinedExpressionGrid) .ifPresent(nestedGrid -> nestedGrid.startEditingCell(0, 0)); cell.getValue().getValue() .filter(nestedGrid -> !(nestedGrid instanceof UndefinedExpressionGrid)) .ifPresent(BaseExpressionGrid::selectFirstCell); cell.getValue().getValue() .filter(nestedGrid -> nestedGrid instanceof LiteralExpressionGrid) .ifPresent(nestedGrid -> nestedGrid.startEditingCell(0, 0)); } ExpressionEditorColumn(final GridWidgetRegistry registry,
                                  final HeaderMetaData headerMetaData,
                                  final double width,
                                  final BaseGrid<? extends Expression> gridWidget);  ExpressionEditorColumn(final GridWidgetRegistry registry,
                                  final List<HeaderMetaData> headerMetaData,
                                  final double width,
                                  final BaseGrid<? extends Expression> gridWidget); protected  ExpressionEditorColumn(final List<HeaderMetaData> headerMetaData,
                                     final BaseGridColumnRenderer<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> renderer,
                                     final double width,
                                     final BaseGrid<? extends Expression> gridWidget); @Override Double getMinimumWidth(); @Override void setWidth(final double width); @Override void setWidthInternal(final double width); @Override void edit(final GridCell<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>> cell,
                     final GridBodyCellEditContext context,
                     final Consumer<GridCellValue<Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>>>> callback); static final double DEFAULT_WIDTH; }