@Test public void applyBackgroundColor() { Group group = mock(Group.class); when(scenarioGridCell.isErrorMode()).thenReturn(true); scenarioGridColumnRenderer.applyBackgroundColor(scenarioGridCell, contextMock, group, themeMock); verify(group, times(1)).add(any()); reset(group); when(scenarioGridCell.isErrorMode()).thenReturn(false); scenarioGridColumnRenderer.applyBackgroundColor(scenarioGridCell, contextMock, group, themeMock); verify(group, never()).add(any()); }
protected void applyBackgroundColor(ScenarioGridCell cell, GridBodyCellRenderContext context, Group group, ScenarioGridRendererTheme theme) { if (cell.isErrorMode()) { final Rectangle bodyErrorBackground = theme.getBodyErrorBackground(cell); bodyErrorBackground.setWidth(context.getCellWidth()); bodyErrorBackground.setHeight(context.getCellHeight()); group.add(bodyErrorBackground); } }
ScenarioGridColumnRenderer extends StringColumnRenderer { protected void applyBackgroundColor(ScenarioGridCell cell, GridBodyCellRenderContext context, Group group, ScenarioGridRendererTheme theme) { if (cell.isErrorMode()) { final Rectangle bodyErrorBackground = theme.getBodyErrorBackground(cell); bodyErrorBackground.setWidth(context.getCellWidth()); bodyErrorBackground.setHeight(context.getCellHeight()); group.add(bodyErrorBackground); } } }
ScenarioGridColumnRenderer extends StringColumnRenderer { protected void applyBackgroundColor(ScenarioGridCell cell, GridBodyCellRenderContext context, Group group, ScenarioGridRendererTheme theme) { if (cell.isErrorMode()) { final Rectangle bodyErrorBackground = theme.getBodyErrorBackground(cell); bodyErrorBackground.setWidth(context.getCellWidth()); bodyErrorBackground.setHeight(context.getCellHeight()); group.add(bodyErrorBackground); } }  }
ScenarioGridColumnRenderer extends StringColumnRenderer { protected void applyBackgroundColor(ScenarioGridCell cell, GridBodyCellRenderContext context, Group group, ScenarioGridRendererTheme theme) { if (cell.isErrorMode()) { final Rectangle bodyErrorBackground = theme.getBodyErrorBackground(cell); bodyErrorBackground.setWidth(context.getCellWidth()); bodyErrorBackground.setHeight(context.getCellHeight()); group.add(bodyErrorBackground); } }  @Override Group renderCell(final GridCell<String> cell,
                            final GridBodyCellRenderContext context); @Override List<GridRenderer.RendererCommand> renderColumn(GridColumn<?> column, GridBodyColumnRenderContext context, BaseGridRendererHelper rendererHelper, BaseGridRendererHelper.RenderingInformation renderingInformation, BiFunction<Boolean, GridColumn<?>, Boolean> columnRenderingConstraint); }
ScenarioGridColumnRenderer extends StringColumnRenderer { protected void applyBackgroundColor(ScenarioGridCell cell, GridBodyCellRenderContext context, Group group, ScenarioGridRendererTheme theme) { if (cell.isErrorMode()) { final Rectangle bodyErrorBackground = theme.getBodyErrorBackground(cell); bodyErrorBackground.setWidth(context.getCellWidth()); bodyErrorBackground.setHeight(context.getCellHeight()); group.add(bodyErrorBackground); } }  @Override Group renderCell(final GridCell<String> cell,
                            final GridBodyCellRenderContext context); @Override List<GridRenderer.RendererCommand> renderColumn(GridColumn<?> column, GridBodyColumnRenderContext context, BaseGridRendererHelper rendererHelper, BaseGridRendererHelper.RenderingInformation renderingInformation, BiFunction<Boolean, GridColumn<?>, Boolean> columnRenderingConstraint);  }