use of org.kie.workbench.common.stunner.lienzo.toolbox.items.ButtonItem in project kie-wb-common by kiegroup.
the class CommonActionsToolboxViewTest method testAddButtonIntoParent.
@Test
@SuppressWarnings("unchecked")
public void testAddButtonIntoParent() {
doInit();
final ButtonItem buttonItem = mock(ButtonItem.class);
tested.addButton(buttonItem);
verify(toolboxView, times(1)).add(eq(buttonItem));
}
use of org.kie.workbench.common.stunner.lienzo.toolbox.items.ButtonItem in project kie-wb-common by kiegroup.
the class AbstractActionsToolboxView method addButton.
@Override
public V addButton(Glyph glyph, String title, Consumer<MouseClickEvent> clickEventConsumer) {
final ButtonItem button = toolboxFactory.buttons().button(renderGlyph(glyph, getGlyphSize())).decorate(createDecorator()).tooltip(tooltip.createItem(title)).onMouseEnter(event -> onMouseEnter()).onMouseExit(event -> onMouseExit()).onClick(event -> clickEventConsumer.accept(new MouseClickEvent(event.getX(), event.getY(), event.getMouseEvent().getClientX(), event.getMouseEvent().getClientY())));
addButton(button);
return cast();
}
use of org.kie.workbench.common.stunner.lienzo.toolbox.items.ButtonItem in project kie-wb-common by kiegroup.
the class FlowActionsToolboxViewTest method testAddButtonIntoParent.
@Test
@SuppressWarnings("unchecked")
public void testAddButtonIntoParent() {
doInit();
final ButtonItem buttonItem = mock(ButtonItem.class);
tested.addButton(buttonItem);
verify(toolboxView, times(1)).add(eq(buttonItem));
}
use of org.kie.workbench.common.stunner.lienzo.toolbox.items.ButtonItem in project kie-wb-common by kiegroup.
the class MorphActionsToolboxViewTest method testAddButtonIntoParent.
@Test
@SuppressWarnings("unchecked")
public void testAddButtonIntoParent() {
doInit();
final ButtonItem buttonItem = mock(ButtonItem.class);
tested.addButton(buttonItem);
verify(toolboxView, times(1)).add(eq(buttonGridItem));
verify(buttonGridItem, times(1)).add(buttonItem);
}
Aggregations