Search in sources :

Example 1 with FixedLayoutGrid

use of org.kie.workbench.common.stunner.lienzo.toolbox.grid.FixedLayoutGrid in project kie-wb-common by kiegroup.

the class MorphActionsToolboxViewTest method assertConfigureButtonGridItem.

private void assertConfigureButtonGridItem() {
    final ArgumentCaptor<Point2DGrid> gridCaptor = ArgumentCaptor.forClass(Point2DGrid.class);
    verify(buttonGridItem, times(1)).grid(gridCaptor.capture());
    final FixedLayoutGrid grid = (FixedLayoutGrid) gridCaptor.getValue();
    assertEquals(1, grid.getRows());
    assertEquals(2, grid.getCols());
    assertEquals(AbstractActionsToolboxView.BUTTON_SIZE, grid.getIconSize(), 0);
    assertEquals(AbstractActionsToolboxView.BUTTON_PADDING, grid.getPadding(), 0);
    verify(buttonGridItem, times(1)).decorate(eq(buttonDecorator));
    verify(buttonGridItem, times(1)).decorateGrid(eq(buttonDecorator));
    verify(toolboxView, times(1)).add(eq(buttonGridItem));
}
Also used : Point2DGrid(org.kie.workbench.common.stunner.lienzo.toolbox.grid.Point2DGrid) FixedLayoutGrid(org.kie.workbench.common.stunner.lienzo.toolbox.grid.FixedLayoutGrid)

Example 2 with FixedLayoutGrid

use of org.kie.workbench.common.stunner.lienzo.toolbox.grid.FixedLayoutGrid in project kie-wb-common by kiegroup.

the class MorphActionsToolboxViewTest method assertConfigureToolbox.

private void assertConfigureToolbox() {
    verify(toolboxView, times(1)).at(eq(MorphActionsToolboxView.TOOLBOX_AT));
    final ArgumentCaptor<Point2DGrid> gridCaptor = ArgumentCaptor.forClass(Point2DGrid.class);
    verify(toolboxView, times(1)).grid(gridCaptor.capture());
    final FixedLayoutGrid grid = (FixedLayoutGrid) gridCaptor.getValue();
    assertEquals(1, grid.getRows());
    assertEquals(1, grid.getCols());
    assertEquals(AbstractActionsToolboxView.BUTTON_SIZE, grid.getIconSize(), 0);
    assertEquals(AbstractActionsToolboxView.BUTTON_PADDING, grid.getPadding(), 0);
}
Also used : Point2DGrid(org.kie.workbench.common.stunner.lienzo.toolbox.grid.Point2DGrid) FixedLayoutGrid(org.kie.workbench.common.stunner.lienzo.toolbox.grid.FixedLayoutGrid)

Aggregations

FixedLayoutGrid (org.kie.workbench.common.stunner.lienzo.toolbox.grid.FixedLayoutGrid)2 Point2DGrid (org.kie.workbench.common.stunner.lienzo.toolbox.grid.Point2DGrid)2