use of com.ait.lienzo.client.core.shape.MultiPath in project kie-wb-common by kiegroup.
the class WiresUtilsTest method isWiresShapeWhenRegisteredWiresShape.
@Test
public void isWiresShapeWhenRegisteredWiresShape() {
final WiresShape ws = new WiresShape(new MultiPath());
WiresUtils.assertShapeGroup(ws.getContainer(), WiresCanvas.WIRES_CANVAS_GROUP_ID);
assertTrue(WiresUtils.isWiresShape(ws));
}
use of com.ait.lienzo.client.core.shape.MultiPath in project kie-wb-common by kiegroup.
the class WiresUtilsTest method isWiresShapeWhenUnregisteredWiresShape.
@Test
public void isWiresShapeWhenUnregisteredWiresShape() {
final WiresShape ws = new WiresShape(new MultiPath());
assertFalse(WiresUtils.isWiresShape(ws));
}
use of com.ait.lienzo.client.core.shape.MultiPath in project kie-wb-common by kiegroup.
the class WiresUtilsTest method isWiresLayerWhenWiresShape.
@Test
public void isWiresLayerWhenWiresShape() {
final WiresShape ws = new WiresShape(new MultiPath());
assertFalse(WiresUtils.isWiresLayer(ws));
}
use of com.ait.lienzo.client.core.shape.MultiPath in project kie-wb-common by kiegroup.
the class CaseManagementCanvasHandlerTest method makeShape.
@SuppressWarnings("unchecked")
private ActivityShape makeShape() {
final CaseManagementTaskShapeDef shapeDef = new CaseManagementTaskShapeDef();
final ActivityView shapeView = new ActivityView(10.0, 20.0);
final ActivityShape shape = new ActivityShape(shapeDef, new PictureShapeView(new MultiPath()), shapeView);
return shape;
}
use of com.ait.lienzo.client.core.shape.MultiPath in project kie-wb-common by kiegroup.
the class AbstractConnectorView method createLine.
static Object[] createLine(LineConnectorFactory lineFactory, final double... points) {
// The head decorator must be not visible, as connectors are unidirectional.
final MultiPath head = new MultiPath();
final MultiPath tail = new MultiPath().M(DECORATOR_WIDTH, DECORATOR_HEIGHT).L(0, DECORATOR_HEIGHT).L(DECORATOR_WIDTH / 2, 0).Z().setFillColor(ColorName.BLACK).setFillAlpha(1);
final AbstractDirectionalMultiPointShape<?> line = lineFactory.createLine(Point2DArray.fromArrayOfDouble(points));
line.setDraggable(true);
line.setSelectionStrokeOffset(SELECTION_OFFSET);
line.setHeadOffset(head.getBoundingBox().getHeight());
line.setTailOffset(tail.getBoundingBox().getHeight());
final MultiPathDecorator headDecorator = new MultiPathDecorator(head);
final MultiPathDecorator tailDecorator = new MultiPathDecorator(tail);
return new Object[] { line, headDecorator, tailDecorator };
}
Aggregations