@Test @SuppressWarnings("unchecked") public void editTrueToFalse() { when( access.isEditable() ).thenReturn( true ); final GridCell<Boolean> cell = new BaseGridCell<>( new BaseGridCellValue<>( true ) ); column.edit( cell, context, callback ); verify( callback, times( 1 ) ).accept( callbackArgumentCaptor.capture() ); final BaseGridCellValue<Boolean> callbackArgument = callbackArgumentCaptor.getValue(); assertFalse( callbackArgument.getValue() ); }
@Override public void edit( final GridCell<Boolean> cell, final GridBodyCellRenderContext context, final Consumer<GridCellValue<Boolean>> callback ) { if ( !isEditable() ) { return; } callback.accept( new GuidedDecisionTableUiCell<>( !cell.getValue().getValue() ) ); }
BooleanUiColumn extends BaseMultipleDOMElementUiColumn<Boolean, CheckBox, CheckBoxDOMElement, CheckBoxDOMElementFactory> { @Override public void edit( final GridCell<Boolean> cell, final GridBodyCellRenderContext context, final Consumer<GridCellValue<Boolean>> callback ) { if ( !isEditable() ) { return; } callback.accept( new GuidedDecisionTableUiCell<>( !cell.getValue().getValue() ) ); } }
BooleanUiColumn extends BaseMultipleDOMElementUiColumn<Boolean, CheckBox, CheckBoxDOMElement, CheckBoxDOMElementFactory> { @Override public void edit( final GridCell<Boolean> cell, final GridBodyCellRenderContext context, final Consumer<GridCellValue<Boolean>> callback ) { if ( !isEditable() ) { return; } callback.accept( new GuidedDecisionTableUiCell<>( !cell.getValue().getValue() ) ); } BooleanUiColumn( final List<HeaderMetaData> headerMetaData,
                            final double width,
                            final boolean isResizable,
                            final boolean isVisible,
                            final GuidedDecisionTablePresenter.Access access,
                            final CheckBoxDOMElementFactory factory ); }
BooleanUiColumn extends BaseMultipleDOMElementUiColumn<Boolean, CheckBox, CheckBoxDOMElement, CheckBoxDOMElementFactory> { @Override public void edit( final GridCell<Boolean> cell, final GridBodyCellRenderContext context, final Consumer<GridCellValue<Boolean>> callback ) { if ( !isEditable() ) { return; } callback.accept( new GuidedDecisionTableUiCell<>( !cell.getValue().getValue() ) ); } BooleanUiColumn( final List<HeaderMetaData> headerMetaData,
                            final double width,
                            final boolean isResizable,
                            final boolean isVisible,
                            final GuidedDecisionTablePresenter.Access access,
                            final CheckBoxDOMElementFactory factory ); @Override void edit( final GridCell<Boolean> cell,
                      final GridBodyCellRenderContext context,
                      final Consumer<GridCellValue<Boolean>> callback ); }
BooleanUiColumn extends BaseMultipleDOMElementUiColumn<Boolean, CheckBox, CheckBoxDOMElement, CheckBoxDOMElementFactory> { @Override public void edit( final GridCell<Boolean> cell, final GridBodyCellRenderContext context, final Consumer<GridCellValue<Boolean>> callback ) { if ( !isEditable() ) { return; } callback.accept( new GuidedDecisionTableUiCell<>( !cell.getValue().getValue() ) ); } BooleanUiColumn( final List<HeaderMetaData> headerMetaData,
                            final double width,
                            final boolean isResizable,
                            final boolean isVisible,
                            final GuidedDecisionTablePresenter.Access access,
                            final CheckBoxDOMElementFactory factory ); @Override void edit( final GridCell<Boolean> cell,
                      final GridBodyCellRenderContext context,
                      final Consumer<GridCellValue<Boolean>> callback );  }