Search in sources :

Example 1 with EdgeBuildRequestImpl

use of org.kie.workbench.common.stunner.core.client.canvas.controls.builder.request.EdgeBuildRequestImpl in project kie-wb-common by kiegroup.

the class CreateConnectorAction method accept.

@SuppressWarnings("unchecked")
private void accept(final int x, final int y, final Edge<? extends ViewConnector<?>, Node> connector, final Node<? extends View<?>, Edge> sourceNode, final Node targetNode) {
    if (null != targetNode) {
        EdgeBuildRequestImpl buildRequest = new EdgeBuildRequestImpl(x, y, connector, sourceNode, targetNode);
        edgeBuilderControl.build(buildRequest, new BuilderControl.BuildCallback() {

            @Override
            public void onSuccess(final String uuid) {
                complete();
            }

            @Override
            public void onError(final ClientRuntimeError error) {
                error(error);
            }
        });
    }
}
Also used : EdgeBuildRequestImpl(org.kie.workbench.common.stunner.core.client.canvas.controls.builder.request.EdgeBuildRequestImpl) ClientRuntimeError(org.kie.workbench.common.stunner.core.client.service.ClientRuntimeError) EdgeBuilderControl(org.kie.workbench.common.stunner.core.client.canvas.controls.builder.EdgeBuilderControl) BuilderControl(org.kie.workbench.common.stunner.core.client.canvas.controls.builder.BuilderControl)

Aggregations

BuilderControl (org.kie.workbench.common.stunner.core.client.canvas.controls.builder.BuilderControl)1 EdgeBuilderControl (org.kie.workbench.common.stunner.core.client.canvas.controls.builder.EdgeBuilderControl)1 EdgeBuildRequestImpl (org.kie.workbench.common.stunner.core.client.canvas.controls.builder.request.EdgeBuildRequestImpl)1 ClientRuntimeError (org.kie.workbench.common.stunner.core.client.service.ClientRuntimeError)1