Search in sources :

Example 36 with MultiPath

use of com.ait.lienzo.client.core.shape.MultiPath in project kie-wb-common by kiegroup.

the class WiresCanvasViewTest method testAddRoot.

@Test
public void testAddRoot() {
    WiresShapeView shapeView = new WiresShapeView(new MultiPath().rect(0, 0, 50, 50));
    tested.addRoot(shapeView);
    verify(wiresLayer, times(1)).add(eq(shapeView.getGroup()));
}
Also used : MultiPath(com.ait.lienzo.client.core.shape.MultiPath) WiresShapeView(org.kie.workbench.common.stunner.client.lienzo.shape.view.wires.WiresShapeView) Test(org.junit.Test)

Example 37 with MultiPath

use of com.ait.lienzo.client.core.shape.MultiPath in project kie-wb-common by kiegroup.

the class WiresCanvasViewTest method testUnDock.

@Test
public void testUnDock() {
    WiresShapeView parent = new WiresShapeView(new MultiPath().rect(0, 0, 50, 50));
    WiresShapeView child = new WiresShapeView(new MultiPath().rect(0, 0, 50, 50));
    tested.undock(parent, child);
    verify(wiresLayer, times(1)).undock(eq(child));
}
Also used : MultiPath(com.ait.lienzo.client.core.shape.MultiPath) WiresShapeView(org.kie.workbench.common.stunner.client.lienzo.shape.view.wires.WiresShapeView) Test(org.junit.Test)

Example 38 with MultiPath

use of com.ait.lienzo.client.core.shape.MultiPath in project kie-wb-common by kiegroup.

the class LienzoLayerUtilsTest method registerShape.

private WiresShape registerShape(final String expectedUUID) {
    final Shape path = new MultiPath();
    final WiresShape ws = new WiresShape((MultiPath) path);
    WiresUtils.assertShapeUUID(ws.getContainer(), expectedUUID);
    return ws;
}
Also used : MultiPath(com.ait.lienzo.client.core.shape.MultiPath) WiresShape(com.ait.lienzo.client.core.shape.wires.WiresShape) Shape(com.ait.lienzo.client.core.shape.Shape) WiresShape(com.ait.lienzo.client.core.shape.wires.WiresShape)

Example 39 with MultiPath

use of com.ait.lienzo.client.core.shape.MultiPath in project kie-wb-common by kiegroup.

the class StunnerBoundsProviderFactoryTest method init.

@Before
public void init() {
    layer = new Layer();
    wiresLayer = new WiresLayer(layer);
    shape1 = new WiresShape(new MultiPath().circle(50)).setLocation(new Point2D(100, 33));
    shape2 = new WiresShape(new MultiPath().circle(230)).setLocation(new Point2D(15, 120));
    wiresLayer.add(shape1);
    wiresLayer.add(shape2);
}
Also used : WiresShape(com.ait.lienzo.client.core.shape.wires.WiresShape) MultiPath(com.ait.lienzo.client.core.shape.MultiPath) Point2D(com.ait.lienzo.client.core.types.Point2D) Layer(com.ait.lienzo.client.core.shape.Layer) WiresLayer(com.ait.lienzo.client.core.shape.wires.WiresLayer) WiresLayer(com.ait.lienzo.client.core.shape.wires.WiresLayer) Before(org.junit.Before)

Aggregations

MultiPath (com.ait.lienzo.client.core.shape.MultiPath)39 Test (org.junit.Test)16 WiresShapeView (org.kie.workbench.common.stunner.client.lienzo.shape.view.wires.WiresShapeView)10 MultiPathDecorator (com.ait.lienzo.client.core.shape.MultiPathDecorator)9 WiresShape (com.ait.lienzo.client.core.shape.wires.WiresShape)9 BoundingBox (com.ait.lienzo.client.core.types.BoundingBox)7 Point2D (com.ait.lienzo.client.core.types.Point2D)7 Point2DArray (com.ait.lienzo.client.core.types.Point2DArray)4 Before (org.junit.Before)4 Layer (com.ait.lienzo.client.core.shape.Layer)3 PickerPart (com.ait.lienzo.client.core.shape.wires.PickerPart)3 DashArray (com.ait.lienzo.client.core.types.DashArray)3 PictureShapeView (org.kie.workbench.common.stunner.shapes.client.view.PictureShapeView)3 Group (com.ait.lienzo.client.core.shape.Group)2 WiresConnection (com.ait.lienzo.client.core.shape.wires.WiresConnection)2 WiresConnector (com.ait.lienzo.client.core.shape.wires.WiresConnector)2 WiresMagnet (com.ait.lienzo.client.core.shape.wires.WiresMagnet)2 NFastArrayList (com.ait.tooling.nativetools.client.collection.NFastArrayList)2 SafeUri (com.google.gwt.safehtml.shared.SafeUri)2 Edge (org.kie.workbench.common.stunner.core.graph.Edge)2