use of org.kie.workbench.common.stunner.core.client.canvas.event.registration.CanvasElementsClearEvent in project kie-wb-common by kiegroup.
the class AbstractSelectionAwareSessionCommandTest method testOnCanvasElementsClearEvent.
@Test
public void testOnCanvasElementsClearEvent() {
CanvasElementsClearEvent event = new CanvasElementsClearEvent(canvasHandler);
command.onCanvasElementsClearEvent(event);
verify(command, times(1)).handleCanvasElementsClearEvent(event);
event = new CanvasElementsClearEvent(anotherCanvasHandler);
command.onCanvasElementsClearEvent(event);
verify(command, never()).handleCanvasElementsClearEvent(event);
}
use of org.kie.workbench.common.stunner.core.client.canvas.event.registration.CanvasElementsClearEvent in project kie-wb-common by kiegroup.
the class BaseSessionCommandKeyboardSelectionAwareTest method testHandleCanvasElementsClearEvent.
@Test
public void testHandleCanvasElementsClearEvent() {
command.bind(session);
((AbstractSelectionAwareSessionCommand) command).handleCanvasElementsClearEvent(new CanvasElementsClearEvent(canvasHandler));
assertFalse(command.isEnabled());
verify(statusCallback, times(1)).execute();
}
use of org.kie.workbench.common.stunner.core.client.canvas.event.registration.CanvasElementsClearEvent in project kie-wb-common by kiegroup.
the class CanvasHandlerImpl method clearCanvas.
@Override
public void clearCanvas() {
super.clearCanvas();
canvasElementsClearEvent.fire(new CanvasElementsClearEvent(this));
}
Aggregations