Search in sources :

Example 1 with IsConnector

use of org.kie.workbench.common.stunner.core.client.shape.view.IsConnector in project kie-wb-common by kiegroup.

the class ConnectorShape method applyConnections.

@Override
public void applyConnections(final Edge<ViewConnector<W>, Node> element, final ShapeView<?> source, final ShapeView<?> target, final MutationContext mutationContext) {
    final ViewConnector connectionContent = element.getContent();
    final Connection sourceConnection = (Connection) connectionContent.getSourceConnection().orElse(null);
    final Connection targetConnection = (Connection) connectionContent.getTargetConnection().orElse(null);
    if (null != source && null != target) {
        IsConnector shapeView = (IsConnector) getShapeView();
        shapeView.connect(source, sourceConnection, target, targetConnection);
    }
}
Also used : ViewConnector(org.kie.workbench.common.stunner.core.graph.content.view.ViewConnector) IsConnector(org.kie.workbench.common.stunner.core.client.shape.view.IsConnector) Connection(org.kie.workbench.common.stunner.core.graph.content.view.Connection)

Aggregations

IsConnector (org.kie.workbench.common.stunner.core.client.shape.view.IsConnector)1 Connection (org.kie.workbench.common.stunner.core.graph.content.view.Connection)1 ViewConnector (org.kie.workbench.common.stunner.core.graph.content.view.ViewConnector)1