Search in sources :

Example 6 with CanvasPanel

use of org.kie.workbench.common.stunner.core.client.canvas.CanvasPanel in project kie-wb-common by kiegroup.

the class LienzoCanvasTest method testDestroy.

@Test
public void testDestroy() {
    CanvasPanel panel = mock(CanvasPanel.class);
    CanvasSettings settings = mock(CanvasSettings.class);
    ViewEventHandlerManager eventHandler = mock(ViewEventHandlerManager.class);
    tested.initialize(panel, settings, eventHandler);
    tested.destroy();
    verify(eventHandler, times(1)).destroy();
    verify(view, times(1)).destroy();
}
Also used : CanvasPanel(org.kie.workbench.common.stunner.core.client.canvas.CanvasPanel) CanvasSettings(org.kie.workbench.common.stunner.core.client.canvas.CanvasSettings) ViewEventHandlerManager(org.kie.workbench.common.stunner.client.lienzo.shape.view.ViewEventHandlerManager) Test(org.junit.Test)

Aggregations

CanvasPanel (org.kie.workbench.common.stunner.core.client.canvas.CanvasPanel)6 Test (org.junit.Test)4 CanvasSettings (org.kie.workbench.common.stunner.core.client.canvas.CanvasSettings)4 ViewEventHandlerManager (org.kie.workbench.common.stunner.client.lienzo.shape.view.ViewEventHandlerManager)2 Document (com.google.gwt.dom.client.Document)1 Widget (com.google.gwt.user.client.ui.Widget)1 Before (org.junit.Before)1 LienzoPanel (org.kie.workbench.common.stunner.client.lienzo.canvas.LienzoPanel)1 LienzoPanelFocusHandler (org.kie.workbench.common.stunner.client.lienzo.components.views.LienzoPanelFocusHandler)1 ShapeSet (org.kie.workbench.common.stunner.core.client.ShapeSet)1 AbstractCanvas (org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvas)1 CanvasHandlerImpl (org.kie.workbench.common.stunner.core.client.canvas.CanvasHandlerImpl)1 TransformImpl (org.kie.workbench.common.stunner.core.client.canvas.TransformImpl)1 AddCanvasNodeCommand (org.kie.workbench.common.stunner.core.client.canvas.command.AddCanvasNodeCommand)1 UpdateElementPositionCommand (org.kie.workbench.common.stunner.core.client.canvas.command.UpdateElementPositionCommand)1 ObserverBuilderControl (org.kie.workbench.common.stunner.core.client.canvas.controls.builder.impl.ObserverBuilderControl)1 CanvasCommand (org.kie.workbench.common.stunner.core.client.command.CanvasCommand)1 CanvasCommandManager (org.kie.workbench.common.stunner.core.client.command.CanvasCommandManager)1 ServiceCallback (org.kie.workbench.common.stunner.core.client.service.ServiceCallback)1 ElementShape (org.kie.workbench.common.stunner.core.client.shape.ElementShape)1