use of org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer.RendererCommand in project drools-wb by kiegroup.
the class GuidedDecisionTableRendererTest method testRenderHeaderBodyDivider.
@Test
public void testRenderHeaderBodyDivider() {
final RendererCommand command = renderer.renderHeaderBodyDivider(10.0);
assertRenderingCommands(Collections.singletonList(command), RenderHeaderGridLinesCommand.class);
}
use of org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer.RendererCommand in project kie-wb-common by kiegroup.
the class BaseExpressionGridRenderingTest method setup.
@Before
@Override
public void setup() {
super.setup();
doReturn(false).when(context).isSelection();
doReturn(new BaseBounds(0, 0, 1000, 1000)).when(gridLayer).getVisibleBounds();
grid.getModel().appendColumn(new RowNumberColumn());
grid.getModel().appendRow(new DMNGridRow());
doReturn(renderSelectorCommand).when(renderer).renderSelector(anyDouble(), anyDouble(), any(BaseGridRendererHelper.RenderingInformation.class));
doReturn(renderSelectedCellsCommand).when(renderer).renderSelectedCells(any(GridData.class), any(GridBodyRenderContext.class), any(BaseGridRendererHelper.class));
final List<RendererCommand> renderHeaderCommands = new ArrayList<>();
renderHeaderCommands.add(renderHeaderBackgroundCommand);
renderHeaderCommands.add(renderHeaderGridLinesCommand);
renderHeaderCommands.add(renderHeaderContentCommand);
doReturn(renderHeaderCommands).when(renderer).renderHeader(any(GridData.class), any(GridHeaderRenderContext.class), any(BaseGridRendererHelper.class), any(BaseGridRendererHelper.RenderingInformation.class));
final List<RendererCommand> renderBodyCommands = new ArrayList<>();
renderBodyCommands.add(renderBodyGridBackgroundCommand);
renderBodyCommands.add(renderBodyGridLinesCommand);
renderBodyCommands.add(renderBodyGridContentCommand);
doReturn(renderBodyCommands).when(renderer).renderBody(any(GridData.class), any(GridBodyRenderContext.class), any(BaseGridRendererHelper.class), any(BaseGridRendererHelper.RenderingInformation.class));
doReturn(renderHeaderBodyDividerCommand).when(renderer).renderHeaderBodyDivider(anyDouble());
doReturn(renderGridBoundaryCommand).when(renderer).renderGridBoundary(any(GridBoundaryRenderContext.class));
doReturn(BaseExpressionGridRenderer.HEADER_HEIGHT).when(renderer).getHeaderHeight();
}
use of org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer.RendererCommand in project drools-wb by kiegroup.
the class GuidedDecisionTableRendererTest method testRenderSelectorIsNotSelectionLayer.
@Test
public void testRenderSelectorIsNotSelectionLayer() {
final RendererCommand command = renderer.renderSelector(10.0, 20.0, renderingInformation);
command.execute(makeGridRendererContext(false));
verify(parent).add(any());
}
use of org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer.RendererCommand in project drools-wb by kiegroup.
the class GuidedDecisionTableRendererTest method testRenderSelector.
@Test
public void testRenderSelector() {
final RendererCommand command = renderer.renderSelector(10.0, 20.0, renderingInformation);
assertRenderingCommands(Collections.singletonList(command), RenderSelectorCommand.class);
}
use of org.uberfire.ext.wires.core.grids.client.widget.grid.renderers.grids.GridRenderer.RendererCommand in project drools-wb by kiegroup.
the class GuidedDecisionTableRendererTest method testRenderSelectorIsSelectionLayer.
@Test
public void testRenderSelectorIsSelectionLayer() {
final RendererCommand command = renderer.renderSelector(10.0, 20.0, renderingInformation);
command.execute(makeGridRendererContext(true));
verify(parent, never()).add(any(Group.class));
}
Aggregations