Search in sources :

Example 1 with AbstractConnectorView

use of org.kie.workbench.common.stunner.shapes.client.view.AbstractConnectorView in project kie-wb-common by kiegroup.

the class BasicShapesFactory method newConnector.

@SuppressWarnings("unchecked")
private Shape<ShapeView> newConnector(final Object instance, final BasicShapeDef shapeDef) {
    final ConnectorShapeDef cShapeDef = (ConnectorShapeDef) shapeDef;
    final AbstractConnectorView view = shapeViewFactory.connector(0, 0, 100, 100);
    return new BasicConnectorShape(cShapeDef, view);
}
Also used : AbstractConnectorView(org.kie.workbench.common.stunner.shapes.client.view.AbstractConnectorView) ConnectorShapeDef(org.kie.workbench.common.stunner.shapes.def.ConnectorShapeDef) BasicConnectorShape(org.kie.workbench.common.stunner.shapes.client.BasicConnectorShape)

Example 2 with AbstractConnectorView

use of org.kie.workbench.common.stunner.shapes.client.view.AbstractConnectorView in project kie-wb-common by kiegroup.

the class CaseManagementCanvasViewTest method addWiresConnector.

@Test
public void addWiresConnector() {
    final AbstractConnectorView connector = new PolylineConnectorView(0.0, 0.0);
    final String uuid = connector.uuid();
    connector.setUUID(uuid);
    view.addShape(connector);
    final WiresShape registeredConnector = view.getWiresManager().getShape(uuid);
    assertNull(registeredConnector);
}
Also used : WiresShape(com.ait.lienzo.client.core.shape.wires.WiresShape) AbstractConnectorView(org.kie.workbench.common.stunner.shapes.client.view.AbstractConnectorView) PolylineConnectorView(org.kie.workbench.common.stunner.shapes.client.view.PolylineConnectorView) Test(org.junit.Test)

Aggregations

AbstractConnectorView (org.kie.workbench.common.stunner.shapes.client.view.AbstractConnectorView)2 WiresShape (com.ait.lienzo.client.core.shape.wires.WiresShape)1 Test (org.junit.Test)1 BasicConnectorShape (org.kie.workbench.common.stunner.shapes.client.BasicConnectorShape)1 PolylineConnectorView (org.kie.workbench.common.stunner.shapes.client.view.PolylineConnectorView)1 ConnectorShapeDef (org.kie.workbench.common.stunner.shapes.def.ConnectorShapeDef)1